homepage Welcome to WebmasterWorld Guest from 54.198.94.76
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
looking for a way to dynamically create a set of form fields
stevemtno




msg:4396137
 8:48 pm on Dec 9, 2011 (gmt 0)

Hi Everyone,

Like the subject says, I'm looking for a way to dynamically create a set of form fields. Here is the scenario:

I'm going to have a customer information form, with company information (business name, address, phone, etc). If the company has more than one location, I need to be able to click a "New Location" button and create a new set of fields for that location. I'm not sure how many times I'll need to create a new set of fields, but at least once or twice, I'm sure.

I will also need to be able to send the form data to either an email address or a database of some kind. I have a PHP script that I use to send form data to an email address, but nothing to send the data to a database. For now, the email script should be fine. Still I need to be able to send the dynamically created field data. Not sure how to do that. The PHP script I'm currently using specifies the field names. Unless I would just add code based on what the new field names would be (I would think a more dynamic approach to this would be better tho).

Any advice on which direction to go with all this would be greatly appreciated.

Thanks!

Steve

 

tangor




msg:4396239
 4:00 am on Dec 10, 2011 (gmt 0)

In the script I'd include a radio box "Another location" with increment count to display the next insert info. How all that stuffs into your database is a different aspect as you will end up with unequal fields (I'm old school and not all that nifty in that regard... I like structured data).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved