function hook_form_alter in Workflow 7.2
Same name and namespace in other branches
- 8 workflow.api.php \hook_form_alter()
Implements hook_form_alter().
Use this hook to alter the form on a Node Form, Comment Form (Edit page).
5 functions implement hook_form_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- workflowfield_form_field_ui_field_edit_form_alter in workflow_field/
workflowfield.field.inc - Implements hook_form_FORM_ID_alter().
- workflownode_form_comment_form_alter in workflow_node/
workflownode.module - Implements hook_form_BASE_FORM_ID_alter().
- workflownode_form_node_form_alter in workflow_node/
workflownode.module - Implements hook_form_BASE_FORM_ID_alter().
- workflow_form_alter in ./
workflow.form.inc - Form builder. Move action buttons next to the 'Save'/'Delete' buttons.
- workflow_notify_og_form_alter in workflow_notify/
workflow_notify_og/ workflow_notify_og.module - Implements hook_form_alter().
File
- ./
workflow.api.php, line 270 - Hooks provided by the workflow module.
Code
function hook_form_alter(&$form, $form_state, $form_id) {
// Get the Entity.
$entity = $form['#entity'];
$entity_type = $form['#entity_type'];
// Use the complicated form, which is suited for all Entity Types.
list(, , $entity_bundle) = entity_extract_ids($entity_type, $entity);
// Discover if this is the correct form.
// ...
// Get the current state and act upon it.
// .. copy code from the hook above.
}