Conditional field population

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
maxline
Forum Newbie
Posts: 7
Joined: Thu Apr 29, 2010 10:14 pm

Conditional field population

Post by maxline »

I have a form I am trying to develop. I am familiar with the drop down list populating from one field to the next dynamically, but I am looking at a different solution utilizing PHP and MYSQL. I am attempting an inventory form. Eventually, I hope to incorporate barcodes, but for now I am hoping to have 2 fields. The 1st allows an item # to be manually typed in. When the field is exited, its sibling will auto-populate with a descriptor (White latex gloves, etc.) if the item # is recognized or an error message (item # not on file).

Any help would be appreciated.

Thank you in advance.
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: Conditional field population

Post by JakeJ »

maxline
Forum Newbie
Posts: 7
Joined: Thu Apr 29, 2010 10:14 pm

Re: Conditional field population

Post by maxline »

That is for drop down. I wanted a free text.
Example:
Box 1 and 2 would be blank starting out.
In Box 1 I would enter one of over 200 product id's, ex.: 394584
Box 2 would then yield Oak, southern red, 5 gallon
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: Conditional field population

Post by JakeJ »

If you look closely at the code and the examples, you'll see it can be used for both.
Post Reply