• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

1.7K

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
Community Expert ,
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.

Votes

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.

 

 

Votes

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
Community Expert ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

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.

Votes

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
New Here ,
Apr 22, 2022 Apr 22, 2022

Copy link to clipboard

Copied

LATEST

Hello, could you please re-post the function, as I cannot seem to find it in the forum even with search you proposed.

Votes

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