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

Reveal/Hide field based on other fields

Engaged ,
Nov 01, 2020 Nov 01, 2020

Copy link to clipboard

Copied

Hi,

 

I know that it is possible to reveal or hide a field based on a value in another, but is it possible to have a field become visible (lets call it "Reveal_A") if the values in two other fields (fields "A" and "B") are specifically entered, e.g. field "A" say has a value of 75.5, and "B" is "16.0".

 

I know its possible to perhaps use script that uses a third field that sums these two values ("A"+"B"), and then used as a single value to then make visible the "Reveal_A" field if the value meets the value defined - just trying to see if this can be done as a script in the field itself "Reveal_A" by referring to the two other values as separate entities. Guessing that my idea might be easier if summing the two fields as previously mentioned?.

 

Thanks

TOPICS
PDF forms

Views

575

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 , Nov 01, 2020 Nov 01, 2020

Yes, it's definitely possible. You can use something like this as the custom calculation script of "Reveal_A":

 

event.target.display = (this.getField("A").valueAsString=="75.5" && this.getField("B").valueAsString=="16.0") ? display.visible : display.hidden;

Votes

Translate

Translate
Community Expert ,
Nov 01, 2020 Nov 01, 2020

Copy link to clipboard

Copied

Yes, it's definitely possible. You can use something like this as the custom calculation script of "Reveal_A":

 

event.target.display = (this.getField("A").valueAsString=="75.5" && this.getField("B").valueAsString=="16.0") ? display.visible : display.hidden;

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
Engaged ,
Nov 02, 2020 Nov 02, 2020

Copy link to clipboard

Copied

LATEST

As always, many thanks for the reply Try67, always on point 😉

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