SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Field Changing

  1. #1
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Field Changing

    I want to make a completely dynamic order form. I would like a control panel to be able to add fields for dropdown / text / etc type of contact information. How would I go about making it so that when a user in the control panel adds a new catagory or contact information space for the form that it creates a new field in the database?

  2. #2
    SitePoint Addict
    Join Date
    Oct 2004
    Location
    Southwest US
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All you would need to do is is create a db statement to add a column to the table. Something like:

    ALTER TABLE table_name ADD column_name column_definition

    You can get an idea of what the column definition should be by what type of input the user chooses.

    By doing this you will also need to write abstract code to process the forms, because you will never know how many inputs (or their names) to expect.

    Hope this helps,
    Itshim


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •