Copy link to clipboard
Copied
I have 15 rows of radio buttons. The export values are Reinforce, Refine and Redirect and they appear at the end of each row of buttons in a textbox. I would like to tally the number of times each value is selected and show it in 3 separate textboxes.
Example: Number of times Reinforce is selected. Number of times Refin is selected, etc.
All of you who answer here are amazing! I really appreciate what you do!
I found the answer. Thanks!
Incase someone else needs something like this, here it is
I have 3 textboxes and changed the other box scripts var testFor values to Refine and Redirect.
The textfields are named RGBGroup.1, RGBGroup.2, up to .15:
var testFor = "Reinforce";
var groups = this.getField("RGBGroup");
var ar = groups.getArray();
var cnt = 0;
for (var i=0; i<ar.length; i++) {
if (ar[i].value == testFor) {
cnt++;
}
}
event.value = cnt;
Copy link to clipboard
Copied
I found the answer. Thanks!
Incase someone else needs something like this, here it is
I have 3 textboxes and changed the other box scripts var testFor values to Refine and Redirect.
The textfields are named RGBGroup.1, RGBGroup.2, up to .15:
var testFor = "Reinforce";
var groups = this.getField("RGBGroup");
var ar = groups.getArray();
var cnt = 0;
for (var i=0; i<ar.length; i++) {
if (ar[i].value == testFor) {
cnt++;
}
}
event.value = cnt;