Thread: Dynamic Forms

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    1
    Rep Power
    0
    I would like to know if it is possible to make a dynamic form.

    I've got to do some reservation forms for car rental agencies. There are about thirty different input possibilities on these forms. eg. some want to have a form that asks for the pickup time, and some want radio buttons that say pickup time is AM or PM. Each company would like about 10 of these to be on their form.

    If I have a database (MySQL) and can keep each customer preference in there, could I dynamically make a form???

    Thanks,
    Lauren
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    If I have a database (MySQL) and can keep each customer preference in there, could I dynamically make a form???

    first you decide your fields and your forms ,how it should appear.then you can save those records in mysql database..




    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    yes, you can do this quite easily...

    if you store the company names in the database, and their options. Then you pull the options out of the database based on the company name, assign the options to a variable, and then only display the form comonent if that option is true..

    let's say you pulled am_pm out of the database, and it's set to 1 if they want it, 0 if the don't.
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    if ($am_pm)
    {
    echo "<input type=radio name="am_pm" value="am">AM
    echo "<input type=radio name="am_pm" value="pm">PM
    }
    [/code]

    then it won't get shown unless the company wants it.

    design your form as if the company wants everything shown...then just leave the parts out that they don't..

    ---John Holmes

Similar Threads

  1. Dynamic Forms - How do I add Combo Boxes on the fly
    By assemblage in forum PHP Development
    Replies: 0
    Last Post: February 5th, 2004, 02:44 PM
  2. help submitting 2 forms, one with dynamic list box...
    By ralphuk100 in forum HTML Programming
    Replies: 4
    Last Post: February 3rd, 2004, 08:24 AM
  3. Dynamic Forms on Pocket IE
    By HarryJ in forum HTML Programming
    Replies: 0
    Last Post: January 15th, 2004, 11:56 AM
  4. Dynamic forms
    By whosnotwo in forum HTML Programming
    Replies: 6
    Last Post: September 10th, 2003, 03:08 PM
  5. Dynamic forms that change by user interactions?
    By BassPlayer in forum PHP Development
    Replies: 4
    Last Post: April 4th, 2003, 03:05 AM

IMN logo majestic logo threadwatch logo seochat tools logo