on 04-08-2015 10:26 AM
Hi All,
Actually I am working on Offline Interactive adobe forms. In one of my requirement I have 16 check boxes in the form and User can select only 3 check boxes among 16 check boxes. If User cal select 3 check boxes the remaining 13 check boxes are go to readonly mode.
For this requirement I written below javascript for all check boxes in click event but it not working. If possible could you please provide the Javascript code for this req..
var counter = 0;
if(CheckBox1.rawValue == "1")
counter++;
if(CheckBox2.rawValue == "1")
counter++;
if(CheckBox3.rawValue == "1")
counter++;
if(CheckBox4.rawValue == "1")
counter++;
if(CheckBox5[0].rawValue == "1")
counter++;
if(CheckBox6.rawValue == "1")
counter++;
if(CheckBox5[1].rawValue == "1")
counter++;
if(CheckBox5[2].rawValue == "1")
counter++;
if(CheckBox5[3].rawValue == "1")
counter++;
if(CheckBox5[4].rawValue == "1")
counter++;
if(CheckBox5[5].rawValue == "1")
counter++;
if(CheckBox5[6].rawValue == "1")
counter++;
if(CheckBox5[7].rawValue == "1")
counter++;
if(CheckBox5[8].rawValue == "1")
counter++;
if(CheckBox5[9].rawValue == "1")
counter++;
if(CheckBox5[10].rawValue == "1")
counter++;
if(counter > 3)
{
xfa.host.messageBox("You can select only Three");
CheckBox5[10].access = "readOnly";
}
Thanks,
Ravi.
Issue resolved using the above code only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.