Hello there I am trying to create A form that its fields will depend on a
form menu.
for example.
/*************** *************** *************** **/
<form name="form1" method="post" action="">
<select name="select">
<option value="1">optio n 1</option>
<option value="2">optio n 2</option>
<option value="3">optio n 3</option>
</select>
Text field 1<input type="text" name="textfield ">
Text Field 2<input type="text" name="textfield 2">
Text Field 3 <input type="text" name="textfield 3">
Text Field 4 <input type="text" name="textfield 4">
<input type="submit" name="Submit" value="Submit">
</form>
/*************** *************** *************** **/
When the option 1 is selected only the textfields 1 and 2 to appear,
when option 2 is selected only textfields 1 and 3 to appear and so on... any
combination I would like.
I tried puting the textfields in "if" statments but i don't like it. its too
messy PHP and HTML code.
Any Ideas of how this could be done better ? If someone did something
similar before and has a relative link it would be good as well.
Thanks
Angelos!!
form menu.
for example.
/*************** *************** *************** **/
<form name="form1" method="post" action="">
<select name="select">
<option value="1">optio n 1</option>
<option value="2">optio n 2</option>
<option value="3">optio n 3</option>
</select>
Text field 1<input type="text" name="textfield ">
Text Field 2<input type="text" name="textfield 2">
Text Field 3 <input type="text" name="textfield 3">
Text Field 4 <input type="text" name="textfield 4">
<input type="submit" name="Submit" value="Submit">
</form>
/*************** *************** *************** **/
When the option 1 is selected only the textfields 1 and 2 to appear,
when option 2 is selected only textfields 1 and 3 to appear and so on... any
combination I would like.
I tried puting the textfields in "if" statments but i don't like it. its too
messy PHP and HTML code.
Any Ideas of how this could be done better ? If someone did something
similar before and has a relative link it would be good as well.
Thanks
Angelos!!
Comment