function tripal_db_form_alter
1.x tripal_db.module | tripal_db_form_alter(&$form, &$form_state, $form_id) |
File
- tripal_db/
tripal_db.module, line 91
Code
function tripal_db_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == "tripal_db_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']['form_action'] == 'Update') {
$form['#action'] = url("admin/tripal/tripal_db/edit_db");
}
if ($form_state['values']['form_action'] == 'Add') {
$form['#action'] = url("admin/tripal/tripal_db/add_db");
}
}
}