Good day..
I have a problem that is grinding my gears for a week and I can not find a solution that will completely fit the requirement I have.
I am building an application with php that aims to allow staff to take orders and submit them to the appropriate department (similar to a shopping cart, but slightly different).
Submitting the order and assigning it to the department is something that I have sorted. what I have in mind is something like this:
- staff clicks a button to add an item
- a pop up will display the items menu
- the staff can select one item at a time, and once the item is selected it's added to the order items.
Items will be populated from the database.
The issue that I have is that for some items I need to have the option to have multiple sub-items. For example, if I have a promo pack that contains there items I will need to add the promo item to the order list with the sub-items below.
the following link has something similar to what I want, what I need is that the number of form elements added to be different depending on the item the staff selects:
http://www.daveismyname.com/demos/dynamic-form-elements-with-jquery/
Any ideas or pointers on how to accomplish this would be highly appreciated.
Edit: Code Removed since it was revised in a major way. I will post the end result once it is complete.