Dynamically Adding Text Fields

  • Thread starter Thread starter MRW
  • Start date Start date
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!
 
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!
*************************************************
 
Back
Top