Hi,
I'm building a questionare with 100 questions. Each has a YES/NO radio button. It will be translated into 6 languages.
I'm using radio boxes and the labels are the questions. Those I want to get from the database.
Is that possible?
Kind Regards
Hi maggie77,
Possible but with v6, v5 is limited in this type of forms, v6 has a repeater area which can take the database results and display a group of radios for each result.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
how would you do it with v6?
Best regards
Hi Maggie,
You will need a "Read data" function before the "Display section", then a "Repeater area" inside Designer, and inside this repeater area you will need to place 1 radio group element, then in this radio group element.
Open the repeater area config, set the "Data provider" to this: {var:read_data_action_name}, where the "read_data_action_name" is the name of the Read Data action, its written inside a "black label".
Then in your radio group label, write this: {var:repeater_name.Model_Name.field_name}
repeater_name: is the name of the repeater area, also in black label
Model_Name: is the name of the Model under "Read data"
field_name: is the name of the database table field you are going to use as the label.
After you get this done let me know so we can discuss the values and the languages.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Maggie77,
In CFv5 I would do this using a DB Read action in the On Load event to load the data; then a Custom Code Element in the Designer tab to loop through the loaded data and build the radio button HTML. You can copy the HTML from a CF Radio button element to use as a template.
Bob
Hi,
thanks for your answers. Which version version do you recommend I use, v5 or v6? Which suits better?
kind regards
Maggie
Hi Maggie,
Both can do it but its easier in v6 since v6 has a repeater area, if you use v5 then you will need to use some PHP code to do the loop and some HTML code for the buttons, but in v6 you don't need to do that.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ok, then I'll try it with v6
Thanks