Skip to content

Programmatically toggling checkboxes in the control panel. #9200

Closed Answered by geertjanknapen1
geertjanknapen1 asked this question in Q&A
Discussion options

You must be logged in to vote

I managed to fix this by myself.

I ended up tracking all changes for checkboxes within the countries Checkboxes fieldtype.
Then upon saving of the entry, using the entry.saving hook, I overwrite the countries key in the payload in order to have al the checked checkboxes present.

This also means that upon saving, all the correct values will be checked even if the EU button is clicked at the start and not right before saving.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by geertjanknapen1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant