Hello I have a event that runs correctly: A dropdown with JSON after read database values:
Is posible put the same values to a checkbox group field??
Thanks
<?php
$results = array();
$results[] = 'coles';
foreach ( $form->data['coles'] as $v ) {
$results[$v['co_registro']] = $v['co_nombre'];
}
echo json_encode($results);
?>
Is posible put the same values to a checkbox group field??
Thanks
Hi ideagrup,
Do you want to create this using AJAX after the form is loaded? If so then you can't use the built-in AJAX methods for a CheckBox group but you could do it with custom JavaScript.
Or do you want to set this up before the form loads - in that case, yes you can do it using the Dynamic Data tab of a Checkbox group action - but the results have to be formatted a bit differently.
Bob
Do you want to create this using AJAX after the form is loaded? If so then you can't use the built-in AJAX methods for a CheckBox group but you could do it with custom JavaScript.
Or do you want to set this up before the form loads - in that case, yes you can do it using the Dynamic Data tab of a Checkbox group action - but the results have to be formatted a bit differently.
Bob
This topic is locked and no more replies can be posted.