Dynamically Adding Text Fields

M

MRW

I'm working on a form where the default is to have one text box for a
phone number. However, if a person wants, they can click on a button
and it will add another field below it, so they can have more than one.
I was able to do this quite easily with ASP & Javascript, but being
that I need the textboxes bound to data, it's a tad more complicated.
Any ideas on how to handle the function that will add text boxes?

Thanks for any help!
 
C

Cowboy \(Gregory A. Beamer\)

If you are only allowing one extra textbox, simply hide it and show it when
they want to add another one. This is not elegant, by any means, but easier
than beating your head against the wall. If you want any number of extra
phone numbers, then you should set up a grid and allow people to add numbers
to it. You can submit the complete "phone number" dataset to the database on
submit.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think Outside the Box!
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top