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.
BUT: If I select all options and save the form, there is a save error in the save action.
What is the error ?
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 ?
[sql] => INSERT INTO ... NULL, NULL, NULL, NULL, '[\"70\"]') ON DUPLICATE KEY UPDATE ... [returned] => 0
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
70 is one of the values from the Checkbox group. But I chose it! So no option set.
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 ?
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.
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 ?
