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

Show/hide fields via Dropdown based on values

Explorer ,
Mar 30, 2023 Mar 30, 2023

Copy link to clipboard

Copied

I need your help, I want show and hide fields via dropdown menu based on values, I tried alot different methods but didn't achieve perfect results. Thank you in advance for your time and consideration.

Code I used here............

if(event.target.value <30){
this.getField("TT534").display = display.hidden;
this.getField("TT5checkeuoruk3").display = display.hidden;
this.getField("TT542").display = display.hidden;
this.getField("TT543").display = display.hidden;

}
else{
this.getField("TT534").display = display.visible;
this.getField("TT5checkeuoruk3").display = display.visible;
this.getField("TT542").display = display.visible;
this.getField("TT543").display = display.visible;

}

 

 

TOPICS
Create PDFs , How to , JavaScript , PDF forms

Views

1.3K

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 , Mar 31, 2023 Mar 31, 2023

Use script as 'custom calculation script'.

Votes

Translate

Translate
Community Expert ,
Mar 31, 2023 Mar 31, 2023

Copy link to clipboard

Copied

Hi,

 

The document attached appears to be blank? and can you explain what the perfect result would be?

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
Explorer ,
Mar 31, 2023 Mar 31, 2023

Copy link to clipboard

Copied

mistakenly I uploaded empty file, I apologies for any inconvience regarding this, File is  attached here.

I want to show and hide fields via dropdown based on values, if values less <30 fields hide else show.

this code is working but too much slow, when I click twice then it show or hide

 Thank you for your time and consideration.

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 ,
Mar 31, 2023 Mar 31, 2023

Copy link to clipboard

Copied

Script in that file refer to fields that doesn't exist.

From your first script if you use it in the dropdown field make sure 'Commit selected value immediately' is checked.

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
Explorer ,
Mar 31, 2023 Mar 31, 2023

Copy link to clipboard

Copied

Yes, Commit is selected but its not working smooth way, I attached a screen recordrd video.

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 ,
Mar 31, 2023 Mar 31, 2023

Copy link to clipboard

Copied

Use script as 'custom calculation 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
Explorer ,
Mar 31, 2023 Mar 31, 2023

Copy link to clipboard

Copied

LATEST

Perfect! Thank you so much 

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