Hello,
I want to hide the variables and the original "Submit" button (in the red retangle below) from the user and use my own variable fields and my own "Submit" button (the blue button with the red arrow).
I had no problem to add, edit and remove variables by code, but I can't simulate the action "Submit" of the original button on my own button...
How can I do that in JavaScript?
My own submit button
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: My own submit button
Hello,
The following codes are called when submit is clicked:
In that code, you should change getParametersValues with your variables.
Thank you.
The following codes are called when submit is clicked:
Code: Select all
jsStiWebViewer1.reportParams.editableParameters = null;
if (jsStiWebViewer1.reportParams.type == "Report") jsStiWebViewer1.reportParams.pageNumber = 0;
jsStiWebViewer1.postInteraction({ action: "Variables", variables: jsStiWebViewer1.controls.parametersPanel.getParametersValues() });
Thank you.
- Attachments
-
- photo_2019-08-23_09-59-10.jpg (44.47 KiB) Viewed 1836 times
Re: My own submit button
ga6riel - would you mind sharing your final html + js addition for your custom submit button?
Any thoughts on how you could put your button below the parameters panel and above the report?
Any thoughts on how you could put your button below the parameters panel and above the report?
Re: My own submit button
Hello,Lech Kulikowski wrote: ↑Fri Aug 23, 2019 7:53 am Hello,
The following codes are called when submit is clicked:In that code, you should change getParametersValues with your variables.Code: Select all
jsStiWebViewer1.reportParams.editableParameters = null; if (jsStiWebViewer1.reportParams.type == "Report") jsStiWebViewer1.reportParams.pageNumber = 0; jsStiWebViewer1.postInteraction({ action: "Variables", variables: jsStiWebViewer1.controls.parametersPanel.getParametersValues() });
Thank you.
Two questions:
1) What class is instantiated in "jsStiWebViewer1"?
2) I didn't understand how I change getParametersValues with my variables.
For now I have two variables (a String List named "breeds" and a datetime named "collDay").
Can you show me what I need to change in the code above?
Thank you.
Re: My own submit button
Still not working properly for me, sorry.
I don't know if it's possible... I'm doing my own parameters panel as well.
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: My own submit button
Hello,
Please check sample in the attachment.
Thank you.
Please check sample in the attachment.
Thank you.
- Attachments
-
- CustomSubmitButton.zip
- (414.94 KiB) Downloaded 193 times