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

Reset Form field not working with dropdown number validations

New Here ,
Nov 15, 2021 Nov 15, 2021

I have a PDF form which has a lot of dropdown fields with values 0 - 5, with 0 being the default.  I then wanted to make sure that if someone clicked/tabbed to the field, and forgot to change it from 0, get a notification that it needed to be a number between 1 - 5.  when I tested out the form, for some reason, anytime I clicked on the "clea form" (reset form) button, the form would goto that field and give me the validation message stating a number 1 - 5.

 

Now iI'm not sure why that would be, since I know the "reset form" function, just resets the fields to their default values, so wwhy would this outcome be the case for my example?

Is there a way I can accomplish this?  if so, how??

 

Thanks for your help.

TOPICS
JavaScript , PDF forms
884
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 ,
Nov 15, 2021 Nov 15, 2021

Where does you use the script? 

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 ,
Nov 15, 2021 Nov 15, 2021

I dont use any scripts for the number validation or clear forms.

I use the built in validation field range under properties for the 1 - 5, and then I just have a button with the reset actuon on mouse down is to reset the form (all fields selected)

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 ,
Nov 15, 2021 Nov 15, 2021

There's no need to add a Validation setting to a drop-down, unless you allow the user to enter custom 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 ,
Nov 16, 2021 Nov 16, 2021

I agree, but they want the form to make it mandatory to have them select a 1 - 5, before moving on to the next cell, since this form is not being submitted anywhere, so simple required fields won't help, just because they are going to have staff just print or save the form locally.

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 ,
Nov 17, 2021 Nov 17, 2021

That can't work. If you define a default value that doesn't fall within the valid range then resetting the field will cause an error message to appear. You need to re-think about how it works.

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 ,
Nov 17, 2021 Nov 17, 2021
LATEST

ok thank you.

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