CF8 - checkbox group

rb rbock 15 Nov, 2025

Hello!

I have a checkbox group with multiple options. I save these with the JSON option in the database. That works so far. Reading and displaying them also works.

BUT: If I select all options and save the form, there is a save error in the save action.

However, it should be possible to deselect all previously selected options again when editing.

Max_admin Max_admin 15 Nov, 2025

BUT: If I select all options and save the form, there is a save error in the save action.

What is the error ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rb rbock 15 Nov, 2025

"On Save Failed" in Save Action

Max_admin Max_admin 15 Nov, 2025

Please enable the form debug and find the exact SQL error returned ? are you using "Modify data source" and you pass the checkboxes as an array ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rb rbock 18 Nov, 2025
[sql] => INSERT  INTO ... NULL, NULL, NULL, NULL, '[\"70\"]') ON DUPLICATE KEY UPDATE ... [returned] => 0
rb rbock 18 Nov, 2025

i don't understand why there's 70 left... i haven't chosen anything.

Max_admin Max_admin 18 Nov, 2025

I do not know which table column is getting the 70, the whole query and the form data array may help here, you can attach a screenshot and make it private

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rb rbock 18 Nov, 2025

70 is one of the values from the Checkbox group. But I chose it! So no option set.

Max_admin Max_admin 18 Nov, 2025

But I chose it! So no option set.

I could not understand this, you chose it or not ? what does the data array have for this field name ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rb rbock 19 Nov, 2025

In the first run, for example, 2 options are set and stored.In the 2nd pass, the 2 options are disabled and saved. This leads to errors and is not stored in the DB. Only if at least 1 option is selected, then I can save the form in the 2nd pass without error.

Max_admin Max_admin 22 Nov, 2025

I still need steps to be able to produce this, I understand you have few checkboxes saved first and you can read them, then when you save again there is an error ?

What does the debug show for this field when you save the 2nd time ? do you run an UPDATE statement or INSERT ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Post a Reply