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

Stimulsoft Reports.WEB discussion
Post Reply
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

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

Post 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".
Lech Kulikowski
Posts: 7339
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

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

Thank you.
#1720
Lech Kulikowski
Posts: 7339
Joined: Tue Mar 20, 2018 5:34 am

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

Post 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.
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

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

Post by bobsov »

Hello Lech,

Sorry I didn't mean Jquery version, I am using Angular version. In above, parametersPanel does not exist.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post 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.
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

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

Post 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
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

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

Post by bobsov »

Any response?
Lech Kulikowski
Posts: 7339
Joined: Tue Mar 20, 2018 5:34 am

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

Post 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.
bobsov
Posts: 115
Joined: Sun Jan 27, 2013 12:10 am

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

Post by bobsov »

As you can see in this screenshot, it complains about InitializeParametersPanel.

https://share.getcloudapp.com/lluyKLjY
Lech Kulikowski
Posts: 7339
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

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

Thank you.
Attachments
photo_2020-04-03_11-11-47.jpg
photo_2020-04-03_11-11-47.jpg (177.12 KiB) Viewed 3737 times
Post Reply