function tripal_pub_form_alter
2.x tripal_pub.module | tripal_pub_form_alter(&$form, &$form_state, $form_id) |
3.x tripal_pub.module | tripal_pub_form_alter(&$form, &$form_state, $form_id) |
1.x tripal_pub.module | tripal_pub_form_alter(&$form, &$form_state, $form_id) |
Implementation of hook_form_alter().
_state _id
Parameters
$form:
Related topics
File
- legacy/
tripal_pub/ tripal_pub.module, line 302 - Basic functionality of the pub module
Code
function tripal_pub_form_alter(&$form, &$form_state, $form_id) {
// turn of preview button for insert/updates
if ($form_id == "chado_pub_node_form") {
// turn of preview button for insert/updates
$form['actions']['preview']['#access'] = FALSE;
//remove the body field
unset($form['body']);
}
if ($form_id == "tripal_pub_importer_setup_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 (array_key_exists('values', $form_state) and $form_state['values']['action'] == 'edit') {
$form['#action'] = url("admin/tripal/legacy/tripal_pub/import/edit/" . $form_state['values']['pub_import_id']);
}
if (array_key_exists('values', $form_state) and $form_state['values']['action'] == 'new') {
$form['#action'] = url("admin/tripal/legacy/tripal_pub/import/new");
}
*/
}
if ($form_id == "tripal_pub_search_form") {
$form['#action'] = url("find/publications");
}
if ($form_id == "chado_pub_node_form") {
}
}