Help please - class toggle within a repeat

I have a form where I want the class of an icon to toggle based on the value one of the inputs. The difficulty is that it is a multi-item form generated within a repeat. As such the names/ids are set dynamically. Normally, I would just set the class to toggle on input.value however I can’t see any way of using the $index in the toggle expression as it would effectively have to parse the $index and then parse again as a string with the value of $index.

The ids are set like

dmx-bind:id="'inp_item'+$index"

while the names are set like

dmx-bind:name="'item['+$index+'][property1]'"

What I want to do is something like

dmx-class:text-success="'inp_item'+$index'.value'"

but I just can’t seem to work out how to do it…

Can any of you heroes help?

Community Page
Last updated: