Hoping someone can point me in the right direction.
My application has a pull down menu for various ingredients and an “add” button beside it to add the ingredient. When added, it will be appended to an ingredient list below the form and each line item of the list will have a field to change quantity and a button to delete.
Anyone have a good strategy how I should implement this?
Started down the path of writing to the list using an onchange with document.getElementById and .innerHTML. A loop will be used to add multiple lines for each ingredient added. I suppose each time a line is added, it can on-the-fly create a text form with a unique name for quantity. In regards to the delete button, I don’t know how the code will know which line item’s delete button was pressed. Any thoughts?
Thanks!