Change Repeating Group Information using Input Field

Hi all,

To provide some background on my setup:

  • On page load, an API is called and its output is saved as a custom state [orderLines].

  • This output is displayed in a Repeating Group (showing each product and its quantity).

  • I also have another custom state [selectedOrderLines] that stores the lines selected via checkboxes on the left.

  • There’s an “Allow quantity edit” checkbox that, when ticked, reveals an Input Field with the Qty field as the initial value.

The idea is to let users select lines in the repeating group and send the corresponding Product and Qty to an external webhook via API.

If “Allow quantity edit” is unticked, I just send the original Qty along with the Product — this part works fine.

What I’m struggling with:
If “Allow quantity edit” is ticked, I want the user to edit the Input Field, and upon submitting, the edited Qty should be sent instead.

The issue is that it’s hard to target and map the Input Field since it’s inside a repeating group. Alternatively, I tried updating the selectedOrderLines custom state directly (so that its Qty value changes for that specific row), but I haven’t figured out how to do this.

Does anyone know how I can achieve this? It feels like a straightforward use case, but I can’t seem to get it working.

Thanks in advance!

Jeff

Put everything in the repeating group into one container group element and call it something like ‘Order Line Selector’ and make it data source be the current cell’s index.

Then in workflows do a ‘when input value is changed’ trigger event and select the input that is your hidden input element. Then when it triggers you will be able to use the ‘Order Line Selector’ value as the correct OrderLine QTY value to change using the ‘this inputs value’ that is exposed in the actions under the when input value is changed trigger.

In your description of the setup you do not mention anything about where you store the value of the new QTY after it is changed. I suspect that is because it doesn’t exist and you are wanting to somehow access the values of the input elements within the repeating groups. In either event, I recommend checking out my paid Plugin Data Jedi if you want the absolute best way to achieve your goal as you will modify the objects themselves and do not need all the custom states, or check out my Free Plugin Get Element Value which will allow you to access the input values and even target them individually with unique HTML IDs so you can modify your JSON payload properly.