You are here

function node_field_node_field_settings_alter in Node Field 7.2

Implements hook_node_field_settings().

File

./node_field.module, line 343
This module provide ability to add extra fields to any single node.

Code

function node_field_node_field_settings_alter($node_field, &$form) {
  if (user_access('add classes to node fields')) {
    $form['node_field_class'] = [
      '#type' => 'textfield',
      '#title' => t('Additional Field Class(es)'),
      '#default_value' => !empty($node_field['settings']['node_field_class']) ? $node_field['settings']['node_field_class'] : NULL,
      '#size' => 60,
      '#weight' => 25,
      '#description' => t('Specify class(es) that you want to add to the field element. It (they) will be added to the class attribute of the element. Multiple classes must be separated by space.'),
    ];
  }
}