Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: dynamic form

  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    391
    Thanks
    76
    Thanked 0 Times in 0 Posts

    dynamic form

    Hi all.
    I have a form with 3 radio buttons. Each option should give you a different text box. Like if i select the Dodge radio button a select box will appear with options. If the user selects Ford a different select box will appear. How can I go about this ?? Please help.
    Thanks
    Tracy

  • #2
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    	<head>
    		<title>47312</title>
    		<style type="text/css">
    			dt,dd	{
    				float:left;
    			}
    			dt	{
    				clear:left;
    			}
    		</style>
    	</head>
    	<body>
    		<form>
    			<fieldset>
    				<dl>
    					<dt><label for="radio1">Radio 1</label></dt>
    					<dd><input id="radio1" name="radio" type="radio" checked="checked"></dd>
    					<dd>
    						<select>
    							<option>Option 1</option>
    							<option>Option 2</option>
    							<option>Option 3</option>
    						</select>
    					</dd>
    
    					<dt><label for="radio2">Radio 2</label></dt>
    					<dd><input id="radio2" name="radio" type="radio"></dd>
    					<dd>
    						<select>
    							<option>Option 1</option>
    							<option>Option 2</option>
    							<option>Option 3</option>
    						</select>
    					</dd>
    				</dl>
    			</fieldset>
    		</form>
    	</body>
    </html>

  • #3
    Regular Coder
    Join Date
    May 2004
    Posts
    391
    Thanks
    76
    Thanked 0 Times in 0 Posts
    Hi there.
    Instead of radio buttons how about one select list. Choosing one of 3 options should produce a text field or another drop list right next to the original drop list.

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    nikko50

    nevermind...got it!
    Jim
    Last edited by JVRudnick; 11-18-2004 at 06:50 PM. Reason: resolved


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •