Help - Search - Members - Calendar
Full Version: Form Design
HTMLHelp Forums > Web Authoring > Web Site Functionality
Red Dog
How can I create a form that adds extra input boxes as I type, for example I'm filling out a form that asks for the usual, my name, address, phone and say my pets name. Now there's one line of input boxes on the web page for my one pet, now lets say I have more pets, as I add the pets name another line of input boxes appear for more names. It's kinda like how access can in a form add a new line as you start typing in the current line. Is this do-able?

Darin McGrew
This has nothing to do with CSS, so I'm moving it to the Functionality forum.
Darin McGrew
There are basically two approaches. The robust approach is to submit the form to the server-side (e.g., CGI, PHP) program that processes it, and to let that server-side program return a new form that includes additional fields.

To do it without submitting the form to the server, you need JavaScript.
Red Dog
How would it be done with JavaScript? Can you point me in the right direction?

Jeff
Christian J
See e.g. http://www.javascriptkit.com/javatutors/dom.shtml
Red Dog
Thank you very much, I believe that' s just what I'm looking for.

Jeff
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.