Jump to content

Auto-fill in a form..


SephirGaine

Recommended Posts

Hey ya'll. This is what I want to do. I've got a form where an employee inserts a customer's information for a work order. Ideally, what I want, is for them to be able to save the information into a database. That's the easy part. However, I'm going to have a drop-down list of all the customers we have saved (once again, easy part), but if they choose one of the customers from this list, it automatically fills in the customer information from the database. However, I'm not sure exactly how to do this.. perhaps this is more of an HTML question than PHP. I know how to do everything except for making the form parts automatically fill themselves in depending on which option they choose. So.. any help/guidance/STFU will help. Thanks!
Link to comment
Share on other sites

Do you mean that you want to select a customer from a first field which is a drop down box and then it will populate the rest of the fields?

If so, you have two options. You can either select the customer and submit a form and then retrieve the information based on that, or you can use ajax if you dont want to have a form submittal.
Link to comment
Share on other sites

Aye, I might just go both routes. For now, just code it using HTML/PHP and then go back at a later date and use Ajax. Reading up a bit on it right now, it's similar to XHMTL, no? If so I know jack about it.. but hey, less than 3 months ago I knew 0 about PHP as well. Thanks for pointing me in the right direction, though!
Link to comment
Share on other sites

If you take a look at the tutorials over at www.ajaxfreaks.com when you have the time you'll find that its actually pretty easy to get started with ajax as its mostly cutting and pasting the javascript.

It'll take a little time to get it to do as you want, but its pretty easy to start.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.