Expand my Community achievements bar.

stop submitting form after clicking a submit button

Avatar

Former Community Member
Hi, I have the need to Stop The submitting of a form when a button is pushed in case of a certain value of a textfield on the PDF form.

The PDF Form in the Workspace have not to submit to the next user in the process.

I didn't find the solution to my question

Can anyone help me?



Thank you



Gabriele
2 Replies

Avatar

Former Community Member
One technique woudl be to create a new button that the user would interpret as the submit button (I will call this a pseudo submit button). You would make the real submit button invisible (so the user cannot see it or click on it, but it can still be used programmatically). Now on the pseudo submit button put your code to validate your information. If this validation passes then click the real submit button. To do this run this code:



submitbuttonname.execEvent("click");



If the validation fails then put a message up. In this technique the real submit cannot be pushed until the validate succeeds.



Hope this helps.

Avatar

Former Community Member
Thank you very nuch Your suggestion was been very helpful.



Gabriele