| View previous topic :: View next topic |
| Author |
Message |
sbrown68
Joined: 19 May 2007 Posts: 13
|
Posted: Tue May 29, 2007 1:59 am Post subject: Extended HTML Forms |
|
|
I have an option on my site which allows a user to enter one or many responces. I would like to give the user the option to enter each responce in a new text box but I would prefer not to have many text boxs on my site when there is a chance they may only need one.
I would like to allow the user to click a button which will generate a new input box for each entry. How can this be done...
Thanks |
|
| Back to top |
|
 |
|
|
mwa103 100+ Club
Joined: 07 Mar 2005 Posts: 206
|
Posted: Thu May 31, 2007 3:57 am Post subject: Re: Extended HTML Forms |
|
|
There are two options I know of to do what you want. Each has it's pros and cons, it's just a matter of deciding which one works good for you.
1. Create a bunch of boxes and hide them using css & javascript until needed
Sample
2. Dynamically create each element using javascript and add them to the page (DHTML)
Sample
1 is a little easier to code, but 2 ensures that only the number of fields you need are created. If you need more info on either of these, post back and I'll try to walk you through the code.
Hope this helps.
-Mike |
|
| Back to top |
|
 |
sbrown68
Joined: 19 May 2007 Posts: 13
|
Posted: Fri Jun 01, 2007 12:26 pm Post subject: Re: Extended HTML Forms |
|
|
You know your stuff Mike! I took your second option and played around with it and got it working.
Thanks for your help! |
|
| Back to top |
|
 |
|