Multiple choice drop-down menu

Load multiple-choice dropdown selections from a database in ChronoForms.

Overview

The issue occurs because the form uses the wrong data mapping code to load stored JSON array values into the dropdown field.
Use the correct data mapping code in the dropdown's value setting and enable the 'Read Data' option to properly convert and display the saved selections.

Answered
Connectivity v6
ra rafaelscouto 29 Dec, 2020
Good afternoon

I need to solve a problem.

I have a drop-down menu of multiple choice, which I load the data from a database.
This data is being saved as follows:

When updating the data I use this: {data.jsonen: HoraAtend.dias},
in the bank table it is registered like this: ["1", "2"] for example.

I need that, when viewing the update event, the data is loaded in this drop-down menu, as well
how it works in any other. But I don't know how to do it when the Multiple Choice option is
enabled.

I hope you understand.

In short, items are not activated

Table data

tab_dias_semana
[1] => Sunday
[2] => Monday
[3] => Tuesday
[4] => Wednesday
[5] => Thursday
[6] => Friday
[7] => Saturday

tab_agenda
...
[days] => ["1", "2"]
...

In image 01 shows how it is currently

In image 02 shows how I need it to be

Multiple choice drop-down menu image 1


Multiple choice drop-down menu image 2
Max_admin Max_admin 02 Jan, 2021
Answer
you will need to call {data.jsonde:HoraAtend.dias} as the dropdown value, v7 has a "Read Data" setting to convert the field value when it's loaded!
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.