How can I save multiple values of a checkbox-section into the database?

Save multiple checkbox values to a database in ChronoForms.

Overview

The issue occurs when the checkbox field name in the form does not include square brackets, causing only the last selected value to be stored.
Ensure the checkbox field name in your form ends with square brackets (e.g., 'checkboxes251[]') to properly submit all selected values as an array. In CF v7, this is handled automatically.

Answered
ChronoForms v6
bu burf 23 Sep, 2020
I have a checkbox with multiple values to select.

---
1=keinen festen Arbeitsplatz
2=einen festen Arbeitsplatz,
3=ein ungestörtes Zimmer,
4=ein eigenes Arbeitszimmer,
5=eine ergonomische Arbeitsplatzausstattung,
6=gute klimatische, Licht- und Raumverhältnisse.
---

However, in the database only the value of the last checked checklbox is being saved.

How can I store all of the values that have been checked into the database, divided by e.g. a colon?

needing a solution until tonight …

Thanks
Carsten
bu burf 23 Sep, 2020
Solved. Sorry. Didn't know that I need to keep the array name including [] ("checkboxes251[]", and not "checkboxes251")
Max_admin Max_admin 23 Sep, 2020
Answer
Good, this is solved in v7 where the brackets are taken care of automatically and there is a default Data Log table!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.