Hey everyone - I’m building an inventory-style app and could use some help with adding pricing information and other data to individual cells in my repeating group.
Current Setup (Working):
- Category Selection: The user selects a category (e.g., “Vegetables”) from a repeating group.
- Population: A second repeating group becomes visible and is populated with items from the database.
- Item Selection: The user selects all the items they have in their inventory using custom states.
- Saving the Selection: After selecting the items, the user saves the updated list using a button. The button deletes the old inventory list and creates a new one with the newly selected (or removed) items.
What I Want to Add:
- Essentially 1 input box and 1 dropdown box.
- I would like the user to be able to manually input a price for each item and then choose a unit type (e.g., “Per Pound,” “Per Item,” “Per Bundle”) from a dropdown. This information should be saved to the database along with the inventory list when the user saves their selection, and it should be recalled when the user logs back in.
What I’ve Tried:
- I created a custom state called “Dollar Price” and set it to update when the user changes the value in the price input field.
- I’ve also tried using a nested repeating group and associating the input box to the parent group’s cell.
Questions:
-
How do I set a unique price for each individual cell in the repeating group?
-
How do I set dropdown selection data for each individual cell in the repeating group?
-
The same value is applied to all input boxes.