Highlighted

Dropdown field validation

New Here ,
Aug 27, 2020

Copy link to clipboard

Copied

Embarassed to have ask for help on this.  I scoured the forums and saw many of Try67's great examples, but could not find an answer.

 

I created a Form in Adobe DC that I send to users to complete and sign via Adobe Sign.  Users tab from field to field and fill in them in.  Several fields are drop downs and are required.  It's well documented that in the UI you can't not have a empty choice as the default, so I made the default read "Make Selection", which as is also well documented, would count as a filled in field even if the user didnot actually make a selection.  

 

I have been trying and failing to borrow js code from other posts to alert the user that the default selection cannot be accpeted when the user tabs to the next field wiothout making a selection or when the user misses the field enirely as they click through the form.  

 

Remember, there is no submit button that I can use to validate fields before the form is sent.  When all required fields are completed, the web based Adobe Sign window displays a final "sign" button which send the form back to us.  As far as I know, I have no control over that button.

 

Any help is MUCH appreciated!

 

TOPICS
PDF forms

Views

47

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Dropdown field validation

New Here ,
Aug 27, 2020

Copy link to clipboard

Copied

Embarassed to have ask for help on this.  I scoured the forums and saw many of Try67's great examples, but could not find an answer.

 

I created a Form in Adobe DC that I send to users to complete and sign via Adobe Sign.  Users tab from field to field and fill in them in.  Several fields are drop downs and are required.  It's well documented that in the UI you can't not have a empty choice as the default, so I made the default read "Make Selection", which as is also well documented, would count as a filled in field even if the user didnot actually make a selection.  

 

I have been trying and failing to borrow js code from other posts to alert the user that the default selection cannot be accpeted when the user tabs to the next field wiothout making a selection or when the user misses the field enirely as they click through the form.  

 

Remember, there is no submit button that I can use to validate fields before the form is sent.  When all required fields are completed, the web based Adobe Sign window displays a final "sign" button which send the form back to us.  As far as I know, I have no control over that button.

 

Any help is MUCH appreciated!

 

TOPICS
PDF forms

Views

48

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 27, 2020 0
Most Valuable Participant ,
Aug 27, 2020

Copy link to clipboard

Copied

I'm not sure it will work in an Adobe Sign form, as it doesn't support scripting I believe, but you can use a hidden (and required) text field with a default value identical to that of the drop-down and a script to copy the selected value from the drop-down to the text field... It works with regular Acrobat forms.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 27, 2020 0
New Here ,
Aug 28, 2020

Copy link to clipboard

Copied

Thanks so much for replying. 

 

As far as I can tell, the scripts still work after the form is converted from Acrobat form to Adobe Sign form.  Once in Adobe Sign "mode", I can't see my dummy test scripts any longer, but they still perform as expected when tabbing through fields.  

 

So, assuming scripts will work or I use a regualr Acrobat form, any tips on how to accomplish what I am aiming for in my post?  The solutions I have seen so far are Mouse Up actions on the submit button, which look like they are doing form level validation.  Any way to do field level validation as I describe?

 

Alternatively, maybe I could add a 'Check For Errors' button at the bottom of the form which would execute form level validation, but that seems awkward.  I just can't believe there is not a simple way to require a user to make a selection in a drop down such that if they tab through without making a selection they get an error and/or if they completelty skip the drop down, the form will not recognize that required field as not having been satisfied.

 

Very grateful for any ideas...

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 28, 2020 0
try67 LATEST
Most Valuable Participant ,
Aug 28, 2020

Copy link to clipboard

Copied

As I said, create a (hidden, but required) text field with the default value set to "Make Selection", and then use this code as its custom calculation script:

 

event.value = this.getField("Dropdown1").valueAsString;

 

(adjust the name of the field in the code to match the actual one, of course)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 28, 2020 0