You are here

function _nd_field_node_info in Node displays 6

Return info about the value field, including token info.

Parameters

array $form The current form.:

1 call to _nd_field_node_info()
nd_code_field_form in includes/nd.fields.inc
Code field form.

File

includes/nd.fields.inc, line 150
Manage fields.

Code

function _nd_field_node_info(&$form) {
  $form['code_identity']['help'] = array(
    '#type' => 'item',
    '#value' => t('Every field will be wrapped in <div class="field field-key">VALUE</div>. Enter PHP code between <?php ?>. Note that executing incorrect PHP-code can break your Drupal site.'),
  );
  if (module_exists('token')) {
    $form['code_identity']['help']['tokens'] = array(
      '#type' => 'fieldset',
      '#title' => t('Placeholder tokens'),
      '#collapsible' => TRUE,
      '#collapsed' => TRUE,
    );
    $form['code_identity']['help']['tokens']['info'] = array(
      '#type' => 'item',
      '#value' => theme('token_help', 'node'),
    );
  }
  else {
    $form['code_identity']['help']['#value'] .= '<br />' . t("To use dynamic placeholder tokens in your custom fields (the ID or title of the current node, for example), download and install the <a href='@token'>Token module</a> from Drupal.org.", array(
      '@token' => 'http://www.drupal.org/project/token',
    ));
  }
}