on 07-15-2011 2:43 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.