good morning guys, I am faced with a problem. I have a form for generating a coupon. In this form it is possible to select the days in which the coupon is valid through the checkboxes.
Now I would like that after the subscription of the form, all the values return to the starting value (without necessarily refreshing the page).
I can reset all the inputs, but not the checkboxes
My checkboxes take a dynamic value (ie I see if that particular day is included within a state (day_selected)).
After submitting the form I reset the value of that state, and this does it correctly. However, the checkboxes remain checked.
I add that the checkboxes are located inside a repeating group (and the individual checkboxes have a state that can be 0 or 1). I would like all states to be reset (I am attaching a picture of my attempts).
There is a more difficult way to fix this which would be to incorporate a plugin that allows you to trigger a workflow action inside of each repeating group cell to change the custom state on your checkboxes and there is an easier way which is to change the way your checkboxes recognize if they should be checked or not.
You currently have a custom state that is on the repeating group that contains a list of days, and when a day is selected that day is added to the custom state list. Presumably, your repeating data type is a day, so on the checkboxes you should make the datasource current cell’s day.
Then on the conditional of the checkbox make it checked if, current cells day is in custom state list of days
actually this is the control I do. That is, I set the status of the checkboxes to dynamic and specific (if these are included in the status of my repeating group (day_selected) then I answer yes and the checkbox should be checked, otherwise set it to no), however it seems that this does not work
As you can see on Sunday for example after doing a reset (my text correctly tells me that it is set to no (because Sunday is no longer included), however the status of the checkbox does not change, but I don’t understand why
I’m not really sure, I don’t use the checkbox element. I just make my own using icons.
It seems though that your dynamic status should be changed and use the same conditional set up I explained before to change the dynamic status between yes and no depending on the condition being met…have one condition for the custom state list contains the parent groups day and make the dynamic status set to yes…and have a second conditional for the custom state list doesn’t contain the parent groups day and make the dynamic status set to no.