form as a table? store to a json column?
To explain with an example, I have a small (4) list of products.
I have an InvoiceResource to capture the customer details, etc. For adding the ordered items (products), we don't want a repeater field, but want to display all products in a table and provide text input next to the products / rows for entering the quantity. Each item will have a default quantity of 0, and the user will update the needed quantity accordingly. (Some rows can remain as zero quantity) - basically the old school way of creating a form table.
Once the 4 rows are filled, I would like to store the item name & quantity into a json column.
I looked into the documentation. Looks like the repeater field won't help here. Please correct me & guide me on how to do it with a repeater field? (an easier, quicker, cleaner approach)
PS: I am tending towards creating a custom field for this.
Note: 4 products can become 6 later. So it has to be dynamic
I have an InvoiceResource to capture the customer details, etc. For adding the ordered items (products), we don't want a repeater field, but want to display all products in a table and provide text input next to the products / rows for entering the quantity. Each item will have a default quantity of 0, and the user will update the needed quantity accordingly. (Some rows can remain as zero quantity) - basically the old school way of creating a form table.
Once the 4 rows are filled, I would like to store the item name & quantity into a json column.
I looked into the documentation. Looks like the repeater field won't help here. Please correct me & guide me on how to do it with a repeater field? (an easier, quicker, cleaner approach)
PS: I am tending towards creating a custom field for this.
Note: 4 products can become 6 later. So it has to be dynamic