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

How to validate a field based on selection from drop down list

New Here ,
Jun 07, 2017 Jun 07, 2017

I have created a drop down list with 10 selections in it. Based on selection of that drop down list a different drop down list opens. How would I set validation for min and max dollar amount based on choice.

Thanks M

TOPICS
Acrobat SDK and JavaScript
440
Translate
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 ,
Jun 07, 2017 Jun 07, 2017

If it's a drop-down field, why validate it? Just set it to only show the acceptable values...

Translate
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 ,
Jun 07, 2017 Jun 07, 2017

The min and max of the field could change based on the answer from drop down list.

Translate
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 ,
Jun 07, 2017 Jun 07, 2017

Is the other field a drop-down as well, or is it a text field?

Translate
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 ,
Jun 07, 2017 Jun 07, 2017

It is a text field.

Translate
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 ,
Jun 07, 2017 Jun 07, 2017

Ah OK, I understood it was a drop-down field...

Well, assuming this file is going to be used in Reader then you can't change the validation script associated with the field.

What you can do is write a script that takes the value of the drop-down into consideration.

So if the drop-down equals A then the script will allow values 1 to 5, if B then 1-10 and if C then values 11-20, for example.

Translate
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 ,
Jun 07, 2017 Jun 07, 2017
LATEST

Thanks try67. My head is going in circles right now. I will try and write a script to control min and max. Will let you know what I figure out.

Thanks for your help.

M

Translate
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