cancel
Showing results for 
Search instead for 
Did you mean: 

Dependeny test fields in adobe interactive form

Private_Member_52584
Participant
0 Kudos

Hi Experts,

In my form i have one drop down list and two text fields(A,B)...

The dropdownlist having two values V,S....

Based on the user selected value in the drop down list the text fields are read only.......

i.e.,if the user select V in the drop down then one of the text field(A) is readonly, else if it is S value then the text field (B) is readonly.

My question is how to catch the user selected value in the form,and how can i do this ...........

Can any one help me..........

Regards,

Venkat.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

As long as I know, you can't change de value type property in scripting. What you can do is hide the textField.

i.e.

Put this js code in the calculate method of the DropDown list.


if(this.rawValue == "S")
{
	TextField2.presence = "invisible"; //or visible or hidden
}

Best regards, Aldo.

Answers (1)

Answers (1)

former_member198445
Participant
0 Kudos

Hi Venkat,

In the 'change' event of the drop down, try the following JavaScript:

var selectedValue = this.boundItem(xfa.event.newText);

switch (selectedValue)
{
   case "V" :  TextFieldA.access = "open";
                     TextFieldB.access = "readOnly";

   case "S" :  TextFieldB.access = "open";
                     TextFieldA.access = "readOnly";
}

Private_Member_52584
Participant
0 Kudos

Hi Everybody,

Thanks for your reply...........i got solution another way.............

Regards,

Venkat.