Set of 6 mutually exclusive checkboxes, but several with the same values
I have a set of 6 items, each with a price. The form user needs to make a mutually exclusive choice among these checkboxes, with the selection determining the value of a total field I would assign the items/prices all the same name, but out of the 6 items, 2 pairs share a price:
Item 1 = $50
Item 2 = $75
Item 3 = $100
Item 4 = $100
Item 5 = $125
Item 6 = $125
Of course, this means that if the user checks item 3, item 4 also becomes active; the same holds true for items 5 and 6.
I tried assigning each item an arbitrary value (1 through 6), having a calculation test for the value, and on the basis of the value, assigning the price to the total, but I can't get the calculation to work.
Here's the calculation I have. Feel free to sneer at my beginnerism:
var TOTAL = 0;
if ((this.getField("01").valueAsString)=="1") TOTAL=50;
if ((this.getField("02").valueAsString)=="2") TOTAL=75;
if ((this.getField("03").valueAsString)=="3") TOTAL=100;
if ((this.getField("04").valueAsString)=="4") TOTAL=100;
if ((this.getField("05").valueAsString)=="5") TOTAL=125;
if ((this.getField("06").valueAsString)=="6") TOTAL=125;
event.value = TOTAL;
Is there a way around this? I considered building these checkboxes as a set of square radio buttons, which would make them mutually exclusive by definition, but the line thickness of square radio buttons is greater than the line thickness of the large number of checkboxes already in this document. This is a situation in which design actually is an essential part of obtaining a satisfactory result.
Thank you for your time.
