last value of two groups of radio buttons
-
Hi,
I have two radio buttons DS fiels (database source). One is fieldname4 and the other is fieldname5. Both of them have class .special-radio.
I need to know what the value of the last selected input of the two groups is and that this vaule . For example:
My client press a radio button of fieldname4, then in one calculate field I make operatios with this value. But if my client press in the other radio buttons Ds field (fieldname5), this new value must be recognized by the calculate field and recalculate.I have this function:
(function(){
var values = [fieldname4,fieldname5],
total = 0,
counter = 0;
for(var i in values)
{
if(values[i]) counter++;
total += values[i];
}
var result = PREC((counter)?total/counter:0, 0);
return result;
})()The problem is that if my client press three o four times other radio buttons, the forms stop working.
Best regards
- The topic ‘last value of two groups of radio buttons’ is closed to new replies.