Skip to main content
cavementech
Participant
December 29, 2016
Question

Radio Button to fill in Text Field

  • December 29, 2016
  • 1 reply
  • 928 views

I apologize for probably asking the same question that someone else has probably asked. I have searched through the forum and tried many different scripts but I have not been able to get this to work for me.

I have created a registration form. I have created 3 radio buttons.

1 Radio Button - #E_Reg

2 Radio Button - #L_Reg

3 Radio Button - #C_Reg

They are all in a group named Reg.

If someone selects the button 1, I need a field named Total_Reg to populate $25

If someone selects the button 2, I need a field named Total_Reg to populate $35

If someone selects the button 3, I need a field named Total_Reg to populate $45

Basically, it is 3 different registration prices. If they are early, they get $25, if they are late it will be $35, if they wait until the convention then it will be $45. Only 1 can be selected, so that they are charged appropriately.

Can someone please help me?

Jason

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
December 29, 2016

Use this code as the custom calculation script of the E_Reg_Cost text field. Adjust it accordingly for the others:

if (this.getField("Reg").value=="#E_Reg") event.value = 25;

else event.value = "";

cavementech
Participant
January 9, 2017

Try67,

Thank you for the script.

I have entered and modified it according to the 3 Registration costs. Unfortunately, I am still not receiving anything in the Total_Reg field when one of the 3 radio buttons are selected.

E_Reg_Cost:

L_Reg_Cost:

C_Reg_Cost:

Total_Reg:

Would it possible for me to email you my PDF for you to see it live?

try67
Community Expert
Community Expert
January 9, 2017

Sure, you can send it over to try6767 at gmail.com.