Form Calculation using Radio Buttons ?
I need to create a form to calculate the cost of an item after a discount is applied. However, the discount can be entered as either:
- A flat dollar amount (price - discount = totalCost), or...
- A percentage (discount/100 * price = totalCost)
I'm thinking the best way to do this would be to add two radio buttons next to the DISCOUNT input field;
- Radio 1 would be for a flat dollar discount
- Radio 2 would be for a percentage discount
And then the totalCost would use an IF/ELSE statement to calculate using the proper formula.
But I have no idea how to write that calculation. Can anyone help?

