I am transferring a custom state value by clicking on a button located on the header via the function get data from the URL so from the header to a page where the value will be used to check/uncheck a box on that page. The custom state has a yes/no value that synchronizes well with the checkbox (yes->the box is checked and no->the box is unchecked).
All goes well until I click on the check box itself and then it doesn’t work anymore. When I click on the button located on the header the check box is not synchronized anymore. I can change the status manually by clicking on the checkbox but by clicking on the button in the header the checkbox state does not change anymore eventhough the state value is yes or no.
I even tried a workflow with Do when condition is true. So Do when checkbox is checked >set state of checkbox>value:yes but still it doesn’t work. When I refresh the entire page it works again.
It would help a lot if you shared a link to your editor, but one thing you could check is the checkbox value - is it dynamic and set to the value of the custom state? Also, have you created the workflows to change the state when the checkbox is clicked?
Yen it is dynamik and SST value to cutom state. I created a workflow as follow:
The value of the custom state change when I click on the checkbox but when I change the value of the custom state by clicking a button the custom state value change but not the checkbox.
Right now what this is saying is when the checkbox is checked > change state to yes. Well, check means yes already. You’re not actually changing the state. It gets stuck in yes.
So you actually want: when checkbox is checked > change to no. When checkbox is not checked > change to yes.
Also, you only need to have the “only when” condition on 1 of those. I recommend adding the “only when” to the event, remove form the set state action, and create another event that does the reverse.
Good advice but still struggling to get it to work
Among the list to add an event, do you chose Elements>An input value is changed or General>Do when condition is true ?
Sorry for asking but what do you mean by “remove form the set state of action”? I selected Element actions>Set state for the checkbox to change status. isn’t it correct?
The event trigger depends. If you need to change the state when a user clicks the box, then use “when input (checkbox) value is changed only when this checkbox is checked > set state to no” and another event “when input value is changed only when this checkbox isn’t checked > set state to yes”
The dynamic value of the checkbox should be set to this custom state.
If you have a link to your editor, I can help see where to adjust specifically.
I reproduced a similar more simplified setup of this issue there:
When you click on Yes or No the value of the checkbox change accordingly and it shows the hidden text.
When you check and uncheck directly the checkbox it also shows the hidden text accordingly
But when you go back clicking on Yes or No, it doesn’t.
This is what I would like to get no matter if you click on yes/no or directly on check/uncheck the hidden text will appear according along with the corresponding check/uncheck marked in the box.
That would be great if you could take a quick look.
Thank you very much
Ok @gil06000, got it working for you. I can see how this got confusing because you’re working with a handful of yes/no conditions and states and values. Take a look at how it’s set up and let me know if any of it doesn’t make sense.