Field calculations based on check boxes
Afternoon everyone,
I am working on a quotation form and there is a field for a base cost [basecostamount].
I then have 3 option fields where the customer can be quoted for extras to the unit [option1costentry], [option2costentry] & [option3costentry]
There is then a subtotal field [subtotalcost]
Using checkboxes (i have these set in the same group [option123] with differing export values [Yes1], [Yes2] & [Yes3]) I would like to be able to calcuate the subtotal of the base unit plus which ever option the customer selects. If they then decide to change their minds and select a different option the subtotalcost will recalculate
I have this currently but i have no idea on JavaScript so im guessing as it doent work its totally incorrct
if (this.getField("option123").value=="Yes1") {
this.getField("subtotalcost")=(basecostamount+option1costentry);
} else if (this.getField("option123").value=="Yes2") {
this.getField("subtotalcost")=(basecostamount+option2costentry);
} else if (this.getField("option123").value=="Yes3") {
this.getField("subtotalcost")=(basecostamount+option3costentry);
}
Any help would be greatly appreciated again......
