You are here

function forena_add_param_form_submit in Forena Reports 6.2

Same name and namespace in other branches
  1. 7.2 forena.admin.inc \forena_add_param_form_submit()
  2. 7.3 forena.admin.inc \forena_add_param_form_submit()
1 string reference to 'forena_add_param_form_submit'
forena_add_param_form in ./forena.admin.inc

File

./forena.admin.inc, line 2534

Code

function forena_add_param_form_submit($form, &$form_state) {
  $values = $form_state['values'];
  $name = $values['rpt_name'];
  $param = $values['params'];
  $r = forena_get_report_editor($name);

  //add the new parms
  $r
    ->addParameter($param);
  $new_report = $r
    ->asXML();
  if (forena_save_report($name, $new_report, TRUE) == 1) {
    drupal_set_message(t('Parameter added'));
    $form_state['redirect'] = $values['return'];
    unset($form_state['storage']);
  }
}