Forums

DB list does not show from CCv5 in CFv5?

AnneM 02 May, 2014
What I did in ChronoConnectivity v5:
1. CC v5 configuration:
General: aanbieders, published: yes
2. Models: aanbieders, selected DB
3. Frontlist: Settings: display type: Table, columns list and fields selected en filled in
Permissions: index / view: Public: allowed
4. Connections Manager click under Front View on View Connection and ...CC5_FElist.jpg
[attachment=0]CC5_FElist.jpg[/attachment]
In ChronoForm v5:
Setup
[attachment=1]CF5_setup1.jpg[/attachment] and EDIT
[attachment=2]CF5_action.jpg[/attachment]

Testing form in FE:
Debugging:
Array
(
[option] => com_chronoforms5
[chronoform] => sport
[Itemid] =>
[ccname] => aanbieders
[Chronoconnectivity] => Array
(
)

)
Array
(
)
Array
(
)

What should I have done?
Thanks for any help.
AnneM
Max_admin 04 May, 2014
Hi Anne,

If you simply want to display a list then no need to use CFv5 here, just use CCv5 and use the "Frontend view" link, we have few tutorials on the FAQs section!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AnneM 04 May, 2014
What I try to achieve here is to show the DB list (some sort of event list) in a form for users to check one or two events, add their name, address, and more data and submit the filled form.

Am I on the right track?
Max_admin 04 May, 2014
how "check one or 2 events" ? you mean open them ?

If yes then you can just use the default connection view and link your list items to your form.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AnneM 04 May, 2014
No, not open them.
I mean check items as in checkbox group (1 checkbox group = 1 event item = 1 record of the database)
finalize the form and submit it and load the data from the from in another database.
Max_admin 05 May, 2014
If you want to have a list of checkboxes based on a list of records in your table then you only need to use the "Dynamic data" section under the checkboxes group settings, this should generate a list based on whatever data source you have!

You will need a "db read" action before the "html" action in order to load the list of records first.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AnneM 05 May, 2014
Under "Designer" tab I put a checkbox group element to my form and enabled Dynamic Data
[attachment=0]Checkbox_group_DynamicData.jpg[/attachment]

Under "Setup" tab i dragged the DB Read action and configured it
[attachment=1]DBread.jpg[/attachment]

But the output is empty:
[attachment=2]Forms_output.jpg[/attachment]
Debug information:
[attachment=3]Array_output.jpg[/attachment][attachment=4]Debuginfo.jpg[/attachment]

What do I do wrong?
Best Regards,
Anne
Max_admin 05 May, 2014
Hi Anne,

Good, now the "data path" should have "Data", because this is the model id you have used, and both the "value key" and "text key" should have fields names, like "sport" for example, this will control the checkboxes texts and values!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AnneM 05 May, 2014
Oooh yes! 😀
That works.

What should I do to show the whole record:
For example:
sport AND aanbieder AND evenement

(all in one line = one choice)
Max_admin 06 May, 2014
Hi Anne,

For this to work, you will need to merge the values first in a new PHP array under a new path then use it instead, just a PHP loop

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AnneM 06 May, 2014
Hi Max,

You mean outside CF merge the values (field of database), save under another path (= another source, being database of XLS-sheet)?

I wouldn't know how to merge values using PHP Loop.

Regards,
Anne
Max_admin 06 May, 2014
Hi Anne,

I thought you mean to just change the "format" of the text in the dropdown ? you want to have a composite text from multiple table fields, correct ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AnneM 06 May, 2014
Yes, I want to display the choices in checkbox group to be like this (replaced by the values/variables)
 sport - aanbieder - evenement


I tried to set value key and text key on the Dynamic tab on "sport,aanbieder,evenement" but that is not the solution because no choices are shown in form at FE.
So, this doesn't work.
Max_admin 07 May, 2014
Answer
Hi Anne,

Yes, you will need to add "custom code" action after the "db read" and before the "html":

<?php
foreach($form->data["Data"] as $k => $r){
$form->data["Data"][$k]["combo"] = $r["sport"]." - ".$r["evenement"];
}

Then use "combo" instead!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
AnneM 07 May, 2014
I placed Custom Code with the PHP code (plus end-tag ?>) and under tab Designer I changed "value key" and "text key" to "combo"
Saved form

And ... Yes! That works perfectly. 🙂

Thank you
This topic is locked and no more replies can be posted.