Problem with dynamic drop down

chriso0258 04 Aug, 2015
Hello,

I'm having a problem with my dynamic drop down list. If I connect to the form (I'll call it form A) from a ChronoConnection OR if I just view the form by clicking on the Test form or View form in the administration side, the drop down works fine as you can see in this picture.
[attachment=0]dropdown1.jpg[/attachment]

However, if I'm in another form (say form B) and use a "Load Form" action to call up form A, the drop down doesn't work as you can see in this picture:
[attachment=1]dropdown2.jpg[/attachment]

I'm a little confused because it appears the drop down is only dependent on the criteria loaded by form A, i.e. the selection of a region. But, as you can see, it doesn't even appear to be calling the event that will filter the sites and run the custom script that provides the options.
<?php
$options = array();
if ( !$form->data['sites'] || count($form->data['sites']) < 1 ) {
  // no result was found
  $options[] = 'Please select a site';
} else {
foreach ( $form->data['sites'] as $d ) {
    $options[$d['site_id']] =  $d['site'];
    }
}
echo json_encode($options);
?>


If the drop down works when I just view the form while inside Chronoforms, that tells me there is no requirement for passing any variables between forms B and A. However, something is obviously different. What am I missing to get the drop down to work using the Load Form action.

Thanks for your assistance.
This topic is locked and no more replies can be posted.