Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
lpianwi
Level 2

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 1
sonya1
Level 1

Like

1 like

Total Posts

32 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
sonya1
Level 1

Like

1 like

Total Posts

32 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
sonya1
Level 1

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";

}



Answers (1)

Answers (1)

Avatar

Avatar
Boost 1
Level 1
S_Candy
Level 1

Like

1 like

Total Posts

16 posts

Correct Reply

2 solutions
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
S_Candy
Level 1

Like

1 like

Total Posts

16 posts

Correct Reply

2 solutions
Top badges earned
Boost 1
Affirm 1
View profile
S_Candy
Level 1

16-09-2014

Hi,

Please try this code in Validate Event of CheBoxfield :

form1.bdyMain.CheBoxfield ::validate - (JavaScript, client)

if(form1.bdyMain.No1.rawValue == 1 || form1.bdyMain.No2.rawValue == 1 || form1.bdyMain.No3.rawValue == 1 || form1.bdyMain.No4.rawValue == 1 || form1.bdyMain.No5.rawValue == 1 )

{

  this.fillColor = "125,125,125";

}

else

{

  this.fillColor = "255,255,255";

}

Hope,this help.

S,Candy.