Add Condition to Submit Button Based on Required Fields
Hey all. I have been scouring forums all morning for an answer to this but keep coming up empty. First of all, I am still VERY novice at javascript in Acrobat, but here is the scenario:
I have 5 required fields in my form. When I have a submit button that just uses the mouse up - submit form event, it will reject the submission if a required field is empty. However, I am submitting using javascript so that I can add text from one of the fields to the subject of the email that this is submitted by. The issue is when it is submitted this way, it no longer seems to validate the form to ensure the required fields are filled.
Some addition context:
The required fields are largely text and are as follows:
repname (text)
pneumonic (text)
customer id (text)
client name (text)
Verification Method1 (drop down)
If all of these are filled out then the form should allow submission. In a perfect world, if they click submit and any of the fields are empty I would love a pop up message that lets them know that field is missing and required.
If it is easier, I am ok with having the button be read only until those fields are filled. I feel like this should be really easy, but I can't seem to make it work. What do you all think?
