-
1. Re: Checkbox values
GKaiseril Jun 1, 2012 2:53 PM (in response to Smitch1581)You could just count how many check boxes have a value other than "Off" and then fill in the field base on that value. Zero and one is blank 2 or greater is "Mul".
-
2. Re: Checkbox values
Smitch1581 Jun 2, 2012 1:56 AM (in response to GKaiseril)Thanx for the reply. For some reason i just cant get this. How do i i check the value is other than "Off"?
-
3. Re: Checkbox values
GKaiseril Jun 2, 2012 5:45 AM (in response to Smitch1581)You are already adding the value to an array when the check box value is not "Off" or the check box has a value other than off.
You need to define a variable to hold the count and then of adding the value of the check box to the array, you increment the count.
Another idea, since you have the non-Off values in an array just check the length or number of items in the array. If the length is greater than 1 then there are multiple entries. If the value is zero then there are no check boxes checked.
change:
// set field value
event.value = aValues.join(", ");
var sect = this.getField("R1").length;
if (sect == "String")
event.value = "MUL";
}
To
// set the field value
event.value ="";
if(aValues.length > 1)
event.value = "Mul";
-
4. Re: Checkbox values
Smitch1581 Jun 2, 2012 1:26 PM (in response to GKaiseril)Thank you very much! Thats was driving me up the wall. Knew what i wanted to do but just couldnt do it!
Thanx again


