You are here

public function FlexiformElement::configureForm in Flexiform 7

Build the configure form for the element.

11 calls to FlexiformElement::configureForm()
FlexiformElementCtoolsContent::configureForm in includes/element/ctools_content.element.inc
Builds the configuration form for the form element.
FlexiformElementCustomHtml::configureForm in includes/element/custom_html.element.inc
Builds the configuration form for the form element.
FlexiformElementEntityProperty::configureForm in includes/element/property.element.inc
Build the configure form for the element.
FlexiformElementField::configureForm in includes/element/field.element.inc
Overrides FlexiformElement::configureForm().
FlexiformElementFlexiform::configureForm in includes/element/flexiform.element.inc
Build the configure form for the element.

... See full list

11 methods override FlexiformElement::configureForm()
FlexiformElementCtoolsContent::configureForm in includes/element/ctools_content.element.inc
Builds the configuration form for the form element.
FlexiformElementCustomHtml::configureForm in includes/element/custom_html.element.inc
Builds the configuration form for the form element.
FlexiformElementEntityProperty::configureForm in includes/element/property.element.inc
Build the configure form for the element.
FlexiformElementField::configureForm in includes/element/field.element.inc
Overrides FlexiformElement::configureForm().
FlexiformElementFlexiform::configureForm in includes/element/flexiform.element.inc
Build the configure form for the element.

... See full list

File

includes/flexiform.element.inc, line 174
Controller class for flexiform elements.

Class

FlexiformElement
Base class for all FlexiformElements

Code

public function configureForm($form, &$form_state, $flexiform) {
  $form['label'] = array(
    '#type' => 'textfield',
    '#title' => t('Label'),
    '#default_value' => !empty($this->settings['label']) ? $this->settings['label'] : '',
    '#weight' => -99,
  );
  $form['display_options'] = array(
    '#tree' => TRUE,
    '#type' => 'fieldset',
    '#title' => t('Display Options'),
    '#weight' => 50,
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['display_options']['css_classes'] = array(
    '#type' => 'textfield',
    '#title' => t('Additional CSS Classes'),
    '#default_value' => !empty($this->settings['display_options']['css']) ? $this->settings['display_options']['css'] : '',
  );
  $form['display_options']['hide_label'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide the Element Label'),
    '#default_value' => !empty($this->settings['display_options']['hide_label']),
  );
  $form['display_options']['hide_element'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide the Element'),
    '#description' => t('Completely hide the element from the form. If hidden an element will pass through its default values.'),
    '#default_value' => !empty($this->settings['display_options']['hide_element']),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
    '#weight' => 100,
  );
  return $form;
}