I’ve created a insert and update form for a PRODUCTS table using PHP and MySQL.
Each form contains a, databound, SELECT field that queries a COMPANIES table to populate.
The record ID, of each company, is used in the PRODUCTS table to group products by company.
I need to find a way to allow users to add new companies while adding products.
I want the user to be able to select ‘Add New’ from the dropdown and trigger a lightbox containing the ‘Add company’ form. They would add the their company name submit that form and the lightbox would close. That would trigger a refresh of the COMPANIES dropdown and select the passed value.
That’s how I see it. Not sure if it’s the best UX but I need some help. I kneed to know:
1. how to trigger the lightbox from an OPTION in the SELECT field.
2. how to place the Add Companies form in the lightbox.
3. how to refresh the COMPANIES SELECT field, on the original form, with the new value. While retaining any previously entered values in other fields.
Any suggestions are greatly appreciated.
Cheers
Doug
Pseuo-code:
All-in-all, it should be pretty simple.