Web Hosting Talk







View Full Version : Need Help with Form Inputs


computerwiz3491
01-19-2007, 01:31 PM
I'm writing a form in php, and I want it so that users could select the number of inputs from a dropdown menu, and it will display that amount of inputs. I am aware that I have to use JavaScript. Does anyone know how to do this?

John[H4Y]
01-20-2007, 02:38 AM
Use something like:
<select name="namehere[]" multiple>
in your html

Xenatino
01-20-2007, 04:39 PM
No, he means if he has a select box with numbers as options (say 1-10). Whichever number he selects, he wants that many input boxes to appear underneath (or above/next-to, OP didn't specify). Then obviously if he selects a lower number, input boxes will disappear to make the number correct.

computerwiz3491: I did have a go last night, but had trouble getting a script to work properly. Probably down to tiredness! I'll try and have another go tonight if I get a minute and see what I can come up with.

computerwiz3491
01-20-2007, 10:53 PM
No, he means if he has a select box with numbers as options (say 1-10). Whichever number he selects, he wants that many input boxes to appear underneath (or above/next-to, OP didn't specify). Then obviously if he selects a lower number, input boxes will disappear to make the number correct.


This is what I meant, sorry for not being more clear in the OP. Thank you for trying.