Hoping that someone cleverer than I might be able to help me out!
I’m designing a form for a client who has issues with users ‘writing over’ previously completed forms to save them time, but this is causing input errors because they dont check all the fields properly.
To help combat this, I’ve suggested using a Submit Button which once clicked, makes all the user input fields Read Only, before it submits the form via email. This way, users can still save the completed form for their records, but will need to refer back to a blank template to produce a new form for submission.
I’ve got this working nicely using the following script as a Mouse Up event:
this.getField(“il”).readonly = true ;
However, the problem is that form has some mandatory fields which the Submit function obviously validates before it attaches to email, which is great, but if a user misses a mandatory field they can’t go back and correct it because the fields have now become read only!
Changing the order of scripts (both Mouse Up events) to Submit a Form THEN run a script doesn’t fix it, unfortunately.
Is there any way of essentially coding the above script to only run if mandatory field validation is successful, and abandon it if not?
Many thanks in advance!