Forums

How to read db-array in CF7 formfield?

hpeterse 18 Dec, 2020
I've stored the result of a checkboxes-field in a database-field , type varchar. Result is an array which is stored as: ["value 1", "value 2"].

I would like to use this stored value as a default-value in a checkboxes-formfield. How do I do that?
Max_admin 19 Dec, 2020
1 Likes
the easiest way is to name your field Model.table_file_name, and enable the "Populate fields" setting in the Read data, also the field should be set to JSON decode in the Read Data "Special fields" advanced setting!

Another way is using the "Dynamic selections" in the Checkboxes advanced settings!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
hpeterse 19 Dec, 2020
Answer
1 Likes
I had to figure some things out. I guess you meant that I should name the field Model.table_field_name (not file), after that it worked. Thanks Max.

Regards, Hans
Max_admin 20 Dec, 2020
yes!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.