You are here

function hook_simplify_hide_field_alter in Simplify 7.3

Same name and namespace in other branches
  1. 8 simplify.api.php \hook_simplify_hide_field_alter()

Alter the way fields are hidden, or hide fields defined in hook_simplify_get_fields_alter().

Parameters

$form: The form array in which the field to be hidden resides. Hiding a field is generally done by setting its '#access' form value to FALSE.

$field: The machine name of the field to be hidden as defined in simplify_get_fields() or hook_simplify_get_fields_alter().

1 invocation of hook_simplify_hide_field_alter()
simplify_hide_field in ./simplify.module
Hide a given field.

File

./simplify.api.php, line 37
Hooks provided by the Simplify module.

Code

function hook_simplify_hide_field_alter(&$form, $field) {

  // Hide our module's custom 'foo' node field
  if ($field == 'foo') {
    $form['foo']['#access'] = FALSE;
  }
}