Forums

Dynamic Dropdown Database v5

dilenio 26 Jun, 2014
Help me please!!!

What im doing wrong? why the second dropdown dont show anything?

Thank you very much
GreyHead 27 Jun, 2014
Hi dilenio,

I can hardly read the images but they look OK. Please post a link to the form when you have it online and I'll take a quick look.

Bob
vales 18 Aug, 2014
1 Likes
change tree things

1) insert in the "on ajax db read" the condition eg:

<?php
return array('categorie.id_estado' => $form->data ['nome']);
?>


2) in the "on ajax db read" change field
id_citade,citade,id_estado

3) the code in the "ona jax custom code"change in

<?php
$ results = array();
$ results [] = 'Select';
foreach ($form->data ['data_citades'] as $v) {
  $ results [$v['id_citade']] = $v['citade'];
}
echo json_encode ($results);
?>
vales 18 Aug, 2014
1 Likes
corrige

3) the code in the "on ajax custom code" change in

<?php
    $results = array();
    $results[] = 'Select';
    foreach ($form->data['data_citades'] as $v) {
      $results[$v['id_citade']] = $v['citade'];
    }
    echo json_encode($results);
?>
This topic is locked and no more replies can be posted.