How to let the user add many products to the cart with its own specifications and insert the full order

Well - it is possible to do - with a repeater :slight_smile:

So the basic logic is like this:

  1. you setup a global variable (add the Variable component) and give it initially value 1
  2. you use the value of this variable to make a repeater children around the row of fields you want to repeat
  3. Your “add” button just set the variable its value +1 which we result in automatically repeating more columns
  4. The delete should be only available on the last row and will do precisely the opposite - set the variable value -1
  5. Make sure you give the repeater a unique key element - like $index which is just the order - so elements retain their position and values

The whole form will be then submitted as multi record form - so on the server side you can just loop through all the records and do with each one what ever you want.

Hope it is a bit clear - it is a bit complex procedure but once you get it - it will all make sense :slight_smile:

2 Likes