I made an form with an input (number/decimal format). Thanks to 2 incremental buttons, the user is able to increase(+1) or decrease (-1) the number in the input field.
I made it thanks to an ‘incrementalState’ custom state linked to the page, and used in buttons and the field. Initial content in the input is parametered as ‘index’s incrementalState’.
My problem is this :
It works UNTIL I manually enter or modify the number in the input, and then click again on the incremental buttons, nothing happens anymore.
Hi there, @ravn… here is one way to do what you described. You could put the input in a group and set the group’s type of content to number and its data source to index's incrementalState. Then, set the input’s initial content to the Parent group's number. Finally, add a workflow so that when the input’s value is changed, the entered value is set as the custom state’s value, and have the second (final) step in the workflow reset the data on the group.
Everything seems crystal clear to me except this part “add a workflow so that when the input’s value is changed, the entered value is set as the custom state’s value” to be honest I don’t find the good way to make it.
(I tried to make it but current functional behaviour is : when I manually modify the value and then click on an increment button the incremental buttons work again but the previous number of clicks on the buttons isn’t reset even if I put the “Reset group” step when Input’s value isnt This Group’s Number).
There is a workflow event that is literally called An input’s value is changed, and I was talking about using that event to detect the change to the input’s value and set the custom state to that value. Want to give that workflow a shot?