I currently have 2 different buttons. One is to print out the form. The other is to submit the form using the HTTP button then we have a php script to take the information. I was wondering if there was a way to combine these two buttons into one?
The submit button is not really a button (in that you cannot add script behind it - there is no click event). From a users perspective you can combine the two functions together so that the user only hits one button. Here is how I would do it:
1. You can programmatically cause the submit button to be pressed by using this command: submit_button_name.execEvent("click")
2. Make the submit button presence - invisible. This will hide the button from the user (so that they cannot press it), but you can still use it to submit programmatically.
3. On the click event of the Print button add the code I mention above.
4. Rename the caption on the print button to something more meaningful like - Submit and Print
Thank you so much for posting! I just tried that code but it is not working for me. Which event does it go on for the DropDown Box? Is it on "change" that the script needs to go to or something else? Furthermore, is the "...event__click..." written exactly as such with the 2 underlines in between?