1 person found this helpful
You made the classic mistake of using the assignment operator "=", where
you should have used the comparison operator "==" in the if-statement.
thank you VERY much...
Thank you for this try67, I am new to this so I don't quite understand the language...
I have a set of radio buttons called "Radio1" and the 3 possible options are Fellow, First Year in Practice, and Resident. I am trying to have a text box populate a value based on this selection.
Could you please help me write a calculation script so that when Fellow is selected it populated 525 in the text box and if either of the other options are selected it calculates 60?
Thank you SO much.
You can use this code as the text field's custom calculation script:
var v = this.getField("Radio1").valueAsString;
if (v=="Off") event.value = "";
else if (v=="Fellow") event.value = "525";
else event.value = "60";