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

Drop Down

New Here ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

If "employed" is selected in the dropdown, Make the employer name field required? How do I achieve this?

Views

248

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 ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

When you post a question you always need to tell the Adobe program you are using
There are MANY programs in a full subscription, plus other non-subscription programs
Please post the exact name of the Adobe program you use so a Moderator may move this message to that forum

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 ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

I am using Adobe Acrobat Pro DC.

 

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
Community Expert ,
Jul 05, 2022 Jul 05, 2022

Copy link to clipboard

Copied

++Edited Reply (added "return.rc = true;" to the second example script

 

Hi,

 

You may be able to achieve that with a validation script or a custom calculation script.

 

In the example below, I am running a  validation script event from the dropdown menu field:

 

 

 

 

event.rc = true;

if (event.value != "Employer") {

this.getField("employer").required = false;

} else {

this.getField("employer").required = true;

}


 

 

 

 

 

A more concise, maybe more elegant way, with same result is shown below expressed in a single line of code:

 

 

 

event.rc = true; (event.value != "Employer") ? this.getField("employer").required = false : this.getField("employer").required = 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
Community Expert ,
Jul 06, 2022 Jul 06, 2022

Copy link to clipboard

Copied

There's no need to add

event.rc = 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
Community Expert ,
Jul 06, 2022 Jul 06, 2022

Copy link to clipboard

Copied

LATEST

Thank you Try67.

 

For some unknown reason to me the script wasn't working as intended without that line when used as validation script.

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