Dear all,
How to user chained dropdown on mutliplier?. We know that multiplier has unique field name, for example : fileupload[__N__][provinsi]. When I tried to implement chained dropdown (province and district) with district db read condition :
and custom code
Maybe I miss something?
Thanks
How to user chained dropdown on mutliplier?. We know that multiplier has unique field name, for example : fileupload[__N__][provinsi]. When I tried to implement chained dropdown (province and district) with district db read condition :
<?php
return array( 'id_prov' => $form->fileupload[__N__][provinsi]);
?>
and custom code
<?php
$options = array();
if ( !$form->data['Kabupaten'] || count($form->data['Kabupaten']) < 1 ) {
// no result was found
$options[] = '-Pilih Kabupaten-';
} else {
foreach ( $form->data['Kabupaten'] as $d ) {
$options[$d['id_kabupaten']] = $d['nm_kab'];
}
}
echo json_encode($options);
?>
Maybe I miss something?
Thanks