Forums

How can I use a radio group in conjuction with a text entry

nightlrd 26 Oct, 2011
Hi,
Here is a question that I hope someone can help me with.
I am putting together an online donation form that will go through Auth.net for processing.

I want to give the people a choice of donation amounts as well as an option to type in their own amount and use what ever option they choose as the donation amount to process. Please see the image I've attached as an example of what I am trying to do.

Thanks for any help you can offer.
GreyHead 27 Oct, 2011
Hi nightlrd ,

How are you going to handle the Optional entries? With another form input or by leaving the amount blank?

The answer is probably to add a little PHP to check the responses and get the right value in the 'amount' field.

Bob
nightlrd 27 Oct, 2011
Thanks for the reply.
I was thinking if possible to have the last radio selection as "other amount" with the value of zero and then have another form element "text box" right below the radio array to enter the "other" amount.
GreyHead 29 Oct, 2011
Hi nightlrd,

There's an article url=http://greyhead.net/chronoforms/chronoforms-adding-an-other-box-to-a-drop-down]here[/url] on doing something similar with a drop-down (from the ChronoForms book and written for CFv3). You can probably adapt the code there.

Bob
This topic is locked and no more replies can be posted.