You are here

public function PartyActivityElementTitle::configureForm in Party 7

Build the configure form for the element.

Overrides FlexiformElement::configureForm

File

modules/party_activity/includes/element/party_activity_title.element.inc, line 71
Contains class for the Node title element.

Class

PartyActivityElementTitle
Class to add the node title field to a form.

Code

public function configureForm($form, &$form_state, $flexiform) {
  $form = parent::configureForm($form, $form_state, $flexiform);
  $form['default_value'] = array(
    '#tree' => TRUE,
    '#type' => 'fieldset',
    '#title' => t('Default Value'),
    '#weight' => -5,
  );
  $form['default_value']['default_value'] = array(
    '#type' => 'textfield',
    '#title' => $this
      ->label() ? $this
      ->label() : t('Default'),
    '#default_value' => !empty($this->settings['default_value']['default_value']) ? $this->settings['default_value']['default_value'] : '',
    '#maxlength' => 255,
  );
  $form['default_value']['use_tokens'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use Tokens in Default Value'),
    '#default_value' => !empty($this->settings['default_value']['use_tokens']),
  );
  $form['default_value']['contexts'] = array(
    '#title' => t('Substitutions'),
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['default_value']['contexts']['contexts'] = $this
    ->getCtoolsSubstitutionsList();
  return $form;
}