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

How Do I Set Form Field =Required property ONLY if another field is filled?

New Here ,
Apr 18, 2022 Apr 18, 2022

Copy link to clipboard

Copied

I have a form where I would like to set the field required property ONLY if another field is filled (specifically if someone enters data listing a serial # for a one of the units, all pass fail data for that unit becomes required) There are multiple units that can have data on a form, but not all WILL have data based on test set up, so I cannot make all fields required.

 

Thanks!

 

TOPICS
How to

Views

357

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 ,
Apr 18, 2022 Apr 18, 2022

Copy link to clipboard

Copied

LATEST

Lets say you want to set "field2" required if "field1" is filled, use this as 'Validation' script of "field1" and change name of the "field2" to your actual name:

this.getField("field2").required = event.value == "" ? false : true;

 

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