Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding/displaying the text fields based on the value of another text field in Adobe Forms

former_member806437
Participant
0 Kudos

Hi,

I have checked answers related to this question, but I did not find the appropriate answer. So, can you please help me in solving the below issue.

I have created a text field(COUNTRY) in subform1 which holds the country value. In the subform2 there is a table(it_item) which contains six text fields(US_COMP , OT_COMP , US_UNITPR , OT_UNITPR , US_TOTCOMM , OT_TOTCOMM).

Now, the requirement is these six text fields should be displayed only when the country field is "US" otherwise it has to be hidden.

Thanks in advance.

1 REPLY 1

Tomas_Buryanek
Active Contributor

This should be able to do using JavaScript.

Select element you want to hide and open Scripts - event "initialize" - and select language to JavaScript (default is often FormCalc).

Script would look something like this:

var CountryCode = your country value;

if (CountryCode == "US") {
this.presence = "visible"; } else { this.presence = "hidden";
}
-- Tomas --