I have 5 yes checkboxes and 5 No checkboxes. If any No is selected. a field is turn grey, even if 4 Yes checkboxes is selected. How would the script be?

Avatar

Avatar

lpianwi

Avatar

lpianwi

lpianwi

15-09-2014

Hi,

I wrote the following script but it does not work:

if((form1.Page1.CBox1.rawValue==1||form1.Page1.CBox2.rawValue==1||form1.Page1.CBox3.rawValue==1||form1.Page1.CBox4.rawValue==1 || form1.Page1.CBox5.rawValue==1) && (form1.Page1.CBoxNo1.rawValue!=1)){

    form1.Page1.CheBoxfield.fillColor = "125,125,125";

}

The above is just one condition, and it does not work. I do not know why it does work. Please users help.

Thanks

Tammy

View Entire Topic

Avatar

Avatar

sonya1

Avatar

sonya1

sonya1

15-09-2014

Hi,

Try this code

if(form1.Page1.CBoxNo1.rawValue == "1" && form1.Page1.CBoxNo2.rawValue == "1" && form1.Page1.CBoxNo3.rawValue == "1" && form1.Page1.CBoxNo4.rawValue == "1" && form1.Page1.CBoxNo5.rawValue == "1")

{

form1.Page1.CheBoxfield.fillColor = "125,125,125";

}

else

{

form1.Page1.CheBoxfield.fillColor = "255,255,255";

}