function tripal_views_form_alter

1.x tripal_views.module tripal_views_form_alter(&$form, &$form_state, $form_id)

File

tripal_views/tripal_views.module, line 218

Code

function tripal_views_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == "tripal_views_integration_form") {
    // updating the form through the ahah callback sets the action of
    // the form to the ahah callback URL. We need to set it back
    // to the normal form URL
    if ($form_state['values']['setup_id']) {
      $form['#action'] = url("admin/tripal/views/integration/edit/" . $form_state['values']['setup_id']);
    }
    else {
      $form['#action'] = url("admin/tripal/views/integration/new");
    }
  }
}