- miciciAsked on April 04, 2016 at 08:58 AM
I would like to know if it's possible, and if yes, how, to add code to my "Submit" button in my form.
The point is to add action, on top of sending the form.
Ideally, I would like to do that on my page and not on the form self to avoid making a lot of different form for each different actions I would llike to add to the button.
I hope I was clear enough with my question..
- JotForm SupportWelvinAnswered on April 04, 2016 at 11:09 AM
For security reasons, we restrict adding scripts in the form so what you can do would be to get the form source codes and modify the source codes before embedding it to your website.
You can save the source as an HTML and then you can embed the HTML file as an iframe to your page. Of course, you have to upload the HTML first to your own server.
- miciciAnswered on April 05, 2016 at 09:45 AMHello,
Thank you for your answer.I found a way to simulate the click on the "Sending" button on my page, so my problem is partially solved.Now I need to hide the button from my page, without deleting it or else I can't simulate its click.
I tried to put its display to none but oddly it doesn't work..document.getElementById('60892377133359').contentWindow.document.getElementById("input_2").style.display = "none";
Do you have a solution to hide the button?
- JotForm SupportWelvinAnswered on April 05, 2016 at 10:51 AM
That's great to know. As for hiding the submit button, I needed to move it to a new thread. Please find my answer to that question in this thread: https://www.jotform.com/answers/810837.