function forena_parameters_form_submit in Forena Reports 6
gets the values from the params form redirects to the report page with the values in the querystring.
File
- ./
forena.common.inc, line 737 - Common functions used throughout the project but loaded in this file to keep the module file lean.
Code
function forena_parameters_form_submit($form, &$form_state) {
$values = $form_state['values'];
foreach ($values['params'] as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $val) {
if (!$val) {
unset($values['params'][$key][$k]);
}
}
}
}
$q = http_build_query($values['params']);
$form_state['redirect'] = array(
$_GET['q'],
$values['params'],
);
}