m4trix.dev
posted this
06 February 2022
Hello. Thanks.
I have managed to create the form. When the user clicks submit it is redirected to another page (I have added the link in the submit dialog). This is fine but I also want to run a script before moving to the new page. At the moment I am manually adding the following html code in bold after the project is exported to html:
form action="link" method=post **onsubmit my-js-function;”**
The scrip does some work and then return true.
Is there a better way to achieve this in nicepage. I can’t see how to add a script to a form. The limitation of my current approach is that I need to add the onsubmit text manually EVERY time I export the project to html.
Thanks
Hello. Thanks.
I have managed to create the form. When the user clicks submit it is redirected to another page (I have added the link in the submit dialog). This is fine but I also want to run a script before moving to the new page. At the moment I am manually adding the following html code in bold after the project is exported to html:
form action="link" method=post **onsubmit my-js-function;”**
The scrip does some work and then return true.
Is there a better way to achieve this in nicepage. I can’t see how to add a script to a form. The limitation of my current approach is that I need to add the onsubmit text manually EVERY time I export the project to html.
Thanks
Last edited 07 February 2022 by m4trix.dev