I'm new to this and really stuck. How can I require mandatory fields to have a value prior to allowing the user to submit via email? I have a regular control type button that is scripted to email the form, however I want to disallow that if the User-Required fields are blank. I can get it to validate the fields by placing this in the mouse down event:
if
(form1.execValidate() == false)
{
xfa.host.messageBox("One or more mandatory fields is blank. Please return to the form to complete all fields marked with a *. \n\nThank you!"
, "Form is incomplete", 0, 0);
}
but I can't make the email submission process stop after that. I would most appreciate any help. If I can't figure this out, I guess I will workaround by hiding the submit button until required fields are complete, but I hate to do that when I know there has to be a simple way that's much better!
Solved! Go to Solution.
Views
Replies
Total Likes
Sorry.. That was the wrong file..
Here is the correct file..
https://acrobat.com/#d=bYzEuuvdFjiex1HoW8wVxA
Thanks
Srini
Views
Replies
Total Likes
Here is a sample for you..
https://acrobat.com/#d=HouRLov3lOntSbqAfsr5Hg
Here it checks for the field values before sending the email.
Thanks
Srini
Views
Replies
Total Likes
Hi Srini- Thanks so much for your response, however, the sample you posted doesn't seem to validate or stop the submission. When I clicked the button, it continued to pull the form into an email with null values. Maybe this is a problem on my end? I do appreciate your help!
Views
Replies
Total Likes
Sorry.. That was the wrong file..
Here is the correct file..
https://acrobat.com/#d=bYzEuuvdFjiex1HoW8wVxA
Thanks
Srini
Views
Replies
Total Likes
Awesome! Thats perfect - thank you so much. You saved the rest of my hair from being
pulled out
Views
Replies
Total Likes
Views
Likes
Replies