Page 1 of 1

how to hide "Reset" button in "Request From User" variable form

Posted: Thu Mar 12, 2020 4:57 pm
by bobsov
How to hide "Reset" button in "Request from User" variables form? This does not work for me and I find it rather not necessary to even have there. If it cannot be hidden, what is the event I need to be looking for. I am using HTML5 viewer.


I use "onInteraction" event, and I can see event being triggered when I click on "Submit" but nothing happens when I click on "Reset".

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Mon Mar 16, 2020 7:28 am
by Lech Kulikowski
Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#1720

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Mon Mar 16, 2020 8:44 am
by Lech Kulikowski
Hello,

You can use the following code:

Code: Select all

//where jsStiWebViewer1 -> "js" + Viewer ID 
jsStiWebViewer1.onready = function () { 
  jsStiWebViewer1.oldInitializeParametersPanel = jsStiWebViewer1.InitializeParametersPanel; 
  jsStiWebViewer1.InitializeParametersPanel = function () { 
    jsStiWebViewer1.oldInitializeParametersPanel(); 
    if (jsStiWebViewer1.controls.parametersPanel) { 
      jsStiWebViewer1.controls.parametersPanel.mainButtons.reset.style.display = "none";
}}}
Thank you.

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Tue Mar 17, 2020 2:05 am
by bobsov
Hello Lech,

Sorry I didn't mean Jquery version, I am using Angular version. In above, parametersPanel does not exist.

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Wed Mar 18, 2020 1:21 pm
by HighAley
Hello,

The jsStiWebViewer1 is our JavaScirpt object of the Viewer.
The parametersPanel is in the object.
It's no matter if you are using Angular or not.

Thank you.

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Mon Mar 23, 2020 3:13 am
by bobsov
This sample code does not work in Angular. I have this.viewer to define the entire stimulsoft viewer object.

I don't know how to use this sample code. The best I see is - this.viewer.jsObject but even if I modify above code, I can't get to hit it.

Can you demonstrate how to apply your sample code on the following github sample code?

https://github.com/stimulsoft/Samples-J ... t%20viewer

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Thu Mar 26, 2020 9:27 pm
by bobsov
Any response?

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Mon Mar 30, 2020 9:11 am
by Lech Kulikowski
Hello,

Please try to check the following code:

Code: Select all

viewer.jsObject.oldInitializeParametersPanel = viewer.jsObject.InitializeParametersPanel; 
viewer.jsObject.InitializeParametersPanel = function () { 
    viewer.jsObject.oldInitializeParametersPanel(); 
    if (viewer.jsObject.controls.parametersPanel) { 
        viewer.jsObject.controls.parametersPanel.mainButtons.reset.style.display = "none";
}}
Thank you.

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Thu Apr 02, 2020 2:31 am
by bobsov
As you can see in this screenshot, it complains about InitializeParametersPanel.

https://share.getcloudapp.com/lluyKLjY

Re: how to hide "Reset" button in "Request From User" variable form

Posted: Fri Apr 03, 2020 10:46 am
by Lech Kulikowski
Hello,

We couldn't reproduce the issue. Please show your code.

Thank you.