Save checkboxes group in DB

Save checkbox group values in a database.

Overview

The issue occurs when using a standard field data placeholder, which doesn't capture multiple selections from a checkbox group.
Use the JSON encode placeholder for the checkbox field name to properly save the array of selected values to the database.

Answered
ChronoForms v8
fw fwm 03 Mar, 2024
Hello,

How do i save the values of the checkboxes group in the DB?

For fields I use field={data:field}, but that doesn't seem to work for the checkboxes group.
Max_admin Max_admin 07 Mar, 2024
Answer
{data.encode:checkboxes_field_name}


This will JSON encode the array value
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.