function forena_fields_form_submit in Forena Reports 6
Same name and namespace in other branches
- 6.2 forena.admin.inc \forena_fields_form_submit()
- 7 forena.admin.inc \forena_fields_form_submit()
- 7.2 forena.admin.inc \forena_fields_form_submit()
- 7.3 forena.admin.inc \forena_fields_form_submit()
File
- ./
forena.admin.inc, line 764
Code
function forena_fields_form_submit($form, &$form_state) {
$values = $form_state['values'];
$name = $values['report_name'];
$r = forena_get_report_editor($name);
/*now build the fields*/
$fields = $values['fields'];
$r
->setFields($fields);
if (forena_save_report($name, $r
->asXML(), TRUE) == 1) {
drupal_set_message('Your report, "' . arg(1) . '" has been saved.');
}
else {
drupal_set_message('There was an error saving your report, "' . $file . '" to the database');
}
}