You are here

public function FlexiformElementCustomHtml::configureForm in Flexiform 7

Builds the configuration form for the form element.

Overrides FlexiformElement::configureForm

File

includes/element/custom_html.element.inc, line 37
Contains class for the Custom HTML form element.

Class

FlexiformElementCustomHtml
@file Contains class for the Custom HTML form element.

Code

public function configureForm($form, &$form_state, $flexiform) {
  $form['custom_html'] = array(
    '#type' => 'text_format',
    '#title' => $this
      ->label(),
    '#format' => !empty($this->settings['custom_html']['format']) ? $this->settings['custom_html']['format'] : NULL,
    '#default_value' => !empty($this->settings['custom_html']['value']) ? $this->settings['custom_html']['value'] : '',
  );
  $form['contexts'] = array(
    '#title' => t('Substitutions'),
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['contexts']['contexts'] = $this
    ->getCtoolsSubstitutionsList();
  $form = parent::configureForm($form, $form_state, $flexiform);
  return $form;
}