chronoforms v5 two dropdowns conects with databases

Create dependent dropdowns in ChronoForms v5 using database connections.

Overview

The issue arises when trying to link two dropdown fields where the second dropdown's options need to be filtered based on the selection in the first dropdown, and both dropdowns must pull values from separate database tables.
Use ChronoConnectivity to establish the database connections. In the DBRead action for the second dropdown, set the filter by correctly referencing the first dropdown's value using the appropriate data path format to ensure the dynamic filtering works.

Answered
id ideagrup 19 May, 2014
Form Student connect Database Student-->
two dropdown fields:
Category DDfield --> Database categories --> field Category
Especiality DDfield --> Database especialities --> Category, Especiality

Two Dropdown fields depending databases values.
The second dropdown needs a filter depending the first selected.

In the chronoforms v5 samples you have a sample like this but without database conections.

But the sample is not database conected,
I have tryed do it but no running

Can you helpme??

Thanks
Max_admin Max_admin 04 Jun, 2014
Answer
Hi ideagrup,

We have already solved this in another topic:
http://www.chronoengine.com/forums/posts/t96538/p331403/chronoforms-5-link-chronoconectivity2.html#p331403

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
id ideagrup 04 Jun, 2014
ohhhhhhh 😀 😀
is RUNNING
You are the best!!!!

Only one problem
ON DBREAD (ajax)
<?php return array("Especialidad" => $form->data("cu_Categoria")); ?>
data("cu_Categoria") is the name reference.

For two dropdowns running ok i have to put
name field = cu_Categoria
id field = cu_Categoria

but to link with chronoconnecticity 5.0 neds
name field = MODELCHRONEC[cu_Categoria]
😟

Thakssssssss

THOMAS
id ideagrup 04 Jun, 2014
:D 😀 😀 😀 😀 😀

Solved the problem too
filter chronoform 5 linked chronoconnectivity in dbREAD
<?php return array("field" => $form->data("modelconnecticity.field")); ?>

😀 😀 😀

Thanks
Max_admin Max_admin 04 Jun, 2014
Just use:
$form->data("Model.cu_Categoria")

OR:
$form->data["model"]["field"]

:)
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.