You are here

function _node_registration_add_token_tree in Node registration 7

Add token tree to form array.

2 calls to _node_registration_add_token_tree()
node_registration_registrations_broadcast_form in includes/node_registration.forms.inc
Return a form for sending a broadcast email to participants.
_node_registration_type_settings_form in includes/node_registration.forms.inc
All registration settings for registration types and nodes.

File

includes/node_registration.forms.inc, line 627
New registration forms. Public and admin.

Code

function _node_registration_add_token_tree(&$form) {
  if (module_exists('token')) {
    $form['token_tree'] = array(
      '#type' => 'fieldset',
      '#title' => t('Tokens'),
      '#collapsible' => TRUE,
      '#collapsed' => FALSE,
      'tokens' => array(
        '#theme' => 'token_tree',
        '#dialog' => TRUE,
        '#token_types' => array(
          'node-registration',
          'node',
          'current-date',
        ),
        '#global_types' => variable_get('node_registration_token_tree_globals', FALSE),
      ),
    );
  }
}