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

Conditionally required fields

Explorer ,
Feb 27, 2018 Feb 27, 2018

I have two similar questions;

1.  I would like to make fields in my form required based on the value entered in another field.  i.e. field a > 10 then field b is required

2.  Alternately, I would like to make field d required if there is any value in field c

Thank you ahead of time for your help.

TOPICS
Acrobat SDK and JavaScript , Windows
776
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

correct answers 1 Correct answer

Community Expert , Feb 27, 2018 Feb 27, 2018

As the custom validation of field "a" enter:

this.getField("b").required = Number(event.value)>10;

As the custom validation of field "c" enter:

this.getField("c").required = (event.value!="");

Translate
Community Expert ,
Feb 27, 2018 Feb 27, 2018
LATEST

As the custom validation of field "a" enter:

this.getField("b").required = Number(event.value)>10;

As the custom validation of field "c" enter:

this.getField("c").required = (event.value!="");

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