Forums

chronoforms 5 link chronoconectivity

ideagrup 01 Jun, 2014
How can i to control 2 database dropdown.

2 dropdown running ok but.

The second depends of first. Like your sample.
But the values are in databases.

Thanks.
GreyHead 02 Jun, 2014
Hi ideagrup,

Please see this FAQ - it is for CFv4 but I think it will work similarly in CFv5.

Bob
ideagrup 02 Jun, 2014
These screenshots show the process

Thanks
ideagrup 04 Jun, 2014
I think that no puts the values in the field. dbread is running and the selection is OK. see image please.

The code for back values to field is this:
<?php
$results = array();
$results[] ='select one please';
foreach ( $form->data['Leer_Especialidades'] as $v ) {
$results[] = $v['cf_id'].'='.$v['Denominacion'];
}
$results = implode("\n", $results);
echo $results;
$mainframe =& JFactory::getApplication();
$mainframe->close();
?>


echo $results no put into field in chronoform 5?

other question. in faqs about this you talk active AJAX.

in chronoforms 5 where is the place to active ajax?

Thomas
Max_admin 04 Jun, 2014
Hi ideagrup,

In v5 you have to return the AJAX response in JSON format, so please replace the following lines:

$results = implode("\n", $results);
echo $results;
$mainframe =& JFactory::getApplication();
$mainframe->close();

by:
echo json_encode($results);


Regards,
Max
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.