I am trying to create a simple calcuation which is dependant on the response to a radio button.
So I have a radio button named Angus with a yes no answer option, I want to calculate a 10% discount if the radio button is yes and give the full price if the radio button is no
So far I have
if (angus == yes) {
finalbasic= (basic-basic/10, basic) ;
if (angus == no)
finalbasic= (basic);
}
but this does not do anything...any advice would be great...I have no knowledge of java so please make any answers simple!
Are you getting any errors?
If so, what are they?
Is there a default checked box for this radio button?
I would assign values to the export value of the radio button and make the 'No" button checked by default. You then set the export value of the "Off" radio button to 1 and the export value for the "Yes" button to 0.10. You can then do not need to use the custom calculation script, you could use the simplified field notation calculation option.
For the finalbasic value:
basic - (basic * angus)
North America
Europe, Middle East and Africa
Asia Pacific