Fill in form from dropdown list

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
crimmelcp
Forum Newbie
Posts: 16
Joined: Mon Jan 28, 2008 8:48 pm

Fill in form from dropdown list

Post by crimmelcp »

I need to know the best way :
when the user selects a vendor from a dropdown select box
the vendor information will be filled in on the form
(example code please)
see attached jpg


Attachment:
File comment: Dropdown select box
vendor_select.jpg
vendor_select.jpg (13.55 KiB) Viewed 133 times


Thanks
Charlie Crimmel
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Fill in form from dropdown list

Post by aceconcepts »

If you want the form to be filled "on change" of the drop-down list then you will have to use Javascript/Ajax.

If you were to have a submit button alongside of the drop-down list then you could use php.

Which one will you use?
crimmelcp
Forum Newbie
Posts: 16
Joined: Mon Jan 28, 2008 8:48 pm

Re: Fill in form from dropdown list

Post by crimmelcp »

form to be filled "on change" of the drop-down list
Vendor Name looks up on the Vendor Table and the other fields are filled in

Thanks
Charlie Crimmel
Post Reply