Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Dropdown selection is required with a default option, need force user to choose other than default

Explorer ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

I don't think the default property options allow for this in Adobe, so looking for anyone who can help me with a script and where I would place that script in the dropdown field properties.

 

I have a dropdown fields on a form labeled "VersionType" that I have indicated in the properties to be required.  For this dropdown field I have 4 dropdown options to choose from:

"-Please Select Version-"

"Version 1"

"Version 2"

"Version 3"

 

I have the "-Please Select Version-" option as the default selection for this dropdown.

 

Essentially I'd like to force the user to be forced to select something other than that default value ("-Please Select Version-") is selected before a user can submit the form.  I'm trying to avoid receiving a form back with an incomplete dropdown responses of "-Please Select Version-" and user not having selected one of the correct available options.

 

Also I have the "Highlight Existing Fields" form function enabled, but is there a way that if a user attempts to submit the form, that it can highlight only those required fields that are incomplete/not complete vs highlighting all the required fields in the form even if they have been completed?  This way user knows exactly which ones exactly are left to complete vs scanning whole doc.

 

Appreciate help thanks!

TOPICS
General troubleshooting, How to, JavaScript, PDF forms

Views

53

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
community guidelines
Adobe Community Professional ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

Unfortunately, drop-downs are not validated in the required fields validation. You will need to use a script to do it.

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
community guidelines
Explorer ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

Thanks.  I'm still very new with no formal training and doing my best to learn custom scripting, its been a lot of piecing together from various forums.  Do you have a scripting template you can share that I can then edit with my necessary labeled fields to hopefully get this to work?

 

My main concern is for the dropdown validation to work the function to show user any missing required form fields is not as big a deal to me as being able to force use to make a dropdown choice other than "-Please Select-" lol.

 

 

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
community guidelines
Adobe Community Professional ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

LATEST

You don't need to specify the fields, the script can pick up all the required fields in the file and check their values. I've posted a function that does that to the forum multiple times in the past. Try searching for "validateRequiredFields". If you can't find it I'll re-post it.

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
community guidelines