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

Applying default values only if another field has been filled

New Here ,
May 03, 2021 May 03, 2021

Copy link to clipboard

Copied

Hello,

 

I'd like to apply the default values in a form field only if another field has been filled (almost sounds like a tongue twister)

 

For example, if I have a form with several rows of Date, Description, Price and the Description nearly always needs to be exactly the same I'd like it so when I add a date, the description is automatically filled with the default values, but otherwise if there is not date it appears blank unless manually filled.

 

Is there any way to accomplish that, perhaps using custom format?

 

TOPICS
JavaScript , PDF forms

Views

553

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

correct answers 1 Correct answer

Community Expert , May 03, 2021 May 03, 2021

As validation script of "Date" field you can use something like this:

if(event.value == "")
this.getField("Description").value = "";
else this.getField("Description").value = "Description goes here";

Change "Description" field name if neccessary.

 

Votes

Translate

Translate
Community Expert ,
May 03, 2021 May 03, 2021

Copy link to clipboard

Copied

As validation script of "Date" field you can use something like this:

if(event.value == "")
this.getField("Description").value = "";
else this.getField("Description").value = "Description goes here";

Change "Description" field name if neccessary.

 

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 ,
May 04, 2021 May 04, 2021

Copy link to clipboard

Copied

LATEST

Thank you Nesa, worked perfectly!

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