Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-09-2011, 12:54 PM #1
- Join Date
- Nov 2011
- Thanked 0 Times in 0 Posts
Radio buttons to populate in a textarea
I have a simple HTML code, with radio buttons. What I need to do is make the value of the radio buttons to populate in a textarea instead of another link or CGI
i.e I want the text area in the same page to be the 'output' of the Radio buttons
I found the below template and added to it the text area.
I think what I need to change is the html_form_handler.cfm (in red), and replace it with an action to throw the outcome to the below textarea
For example the textarea field in the end should have the value of the radio button chosen in 'preferred color' in a line, and the value of the radio button chosen in 'preferred item' in a second line
<form action="/html/codes/html_form_handler.cfm" method="get">
<input type="radio" name="preferred_color" value="Red" /> Red<br />
<input type="radio" name="preferred_color" value="Blue" /> Blue<br />
<input type="radio" name="preferred_color" value="Green" /> Green<br />
<input type="radio" name="preferred_item" value="Car" /> Car (The latest Aston Martin!)<br />
<input type="radio" name="preferred_item" value="House" /> House (Waterfront Mansion)<br />
<input type="radio" name="preferred_item" value="Coffee Machine" /> Coffee Machine (umm...but it's a really good one...)<br />
<input type="submit" value="Submit">
<textarea rows="20" cols="60">
Radio Buttons outcome should generate Here
I'm sure it's very simple but I have no clue how to do it!
I would greatly appreciate any help.
Thanks a lot in advance
Last edited by GLogan; 11-09-2011 at 01:14 PM.
11-09-2011, 04:12 PM #2
- Join Date
- Jan 2011
- Thanked 593 Times in 592 Posts
In either case it takes more then HTML.
You never say what the submit button is used for. And you really don't need a textarea to do this. A div will do.