/** * {@inheritdoc} */ public function settingsForm() { $form = parent::settingsForm(); if ($this->context == 'form') { $form['required_fields'] = array('#type' => 'checkbox', '#title' => $this->t('Mark group as required if it contains required fields.'), '#default_value' => $this->getSetting('required_fields'), '#weight' => 2); } return $form; }
/** * {@inheritdoc} */ public function settingsForm() { $form = parent::settingsForm(); $form['formatter'] = array('#title' => $this->t('Default state'), '#type' => 'select', '#options' => array_combine($this->pluginDefinition['format_types'], $this->pluginDefinition['format_types']), '#default_value' => $this->getSetting('formatter'), '#weight' => -4); if ($this->context == 'form') { $form['required_fields'] = array('#type' => 'checkbox', '#title' => $this->t('Mark group as required if it contains required fields.'), '#default_value' => $this->getSetting('required_fields'), '#weight' => 2); } return $form; }
/** * {@inheritdoc} */ public function settingsForm() { $form = parent::settingsForm(); $form['element'] = array('#title' => $this->t('Element'), '#type' => 'textfield', '#default_value' => $this->getSetting('element'), '#description' => $this->t('E.g. div, section, aside etc.'), '#weight' => 1); $form['show_label'] = array('#title' => $this->t('Show label'), '#type' => 'select', '#options' => array(0 => $this->t('No'), 1 => $this->t('Yes')), '#default_value' => $this->getSetting('show_label'), '#weight' => 2); $form['label_element'] = array('#title' => $this->t('Label element'), '#type' => 'textfield', '#default_value' => $this->getSetting('label_element'), '#weight' => 3); $form['attributes'] = array('#title' => $this->t('Attributes'), '#type' => 'textfield', '#default_value' => $this->getSetting('attributes'), '#description' => $this->t('E.g. name="anchor"'), '#weight' => 4); return $form; }
/** * {@inheritdoc} */ public function settingsForm() { $form = parent::settingsForm(); $form['element'] = array('#title' => $this->t('Element'), '#type' => 'textfield', '#default_value' => $this->getSetting('element'), '#description' => $this->t('E.g. div, section, aside etc.'), '#weight' => 1); $form['show_label'] = array('#title' => $this->t('Show label'), '#type' => 'select', '#options' => array(0 => $this->t('No'), 1 => $this->t('Yes')), '#default_value' => $this->getSetting('show_label'), '#weight' => 2, '#attributes' => array('data-fieldgroup-selector' => 'show_label')); $form['label_element'] = array('#title' => $this->t('Label element'), '#type' => 'textfield', '#default_value' => $this->getSetting('label_element'), '#weight' => 3, '#states' => array('visible' => array(':input[data-fieldgroup-selector="show_label"]' => array('value' => 1)))); $form['attributes'] = array('#title' => $this->t('Attributes'), '#type' => 'textfield', '#default_value' => $this->getSetting('attributes'), '#description' => $this->t('E.g. name="anchor"'), '#weight' => 4); $form['effect'] = array('#title' => $this->t('Effect'), '#type' => 'select', '#options' => array('none' => $this->t('None'), 'collapsible' => $this->t('Collapsible'), 'blind' => $this->t('Blind')), '#default_value' => $this->getSetting('effect'), '#weight' => 5, '#attributes' => array('data-fieldgroup-selector' => 'effect')); $form['speed'] = array('#title' => $this->t('Speed'), '#type' => 'select', '#options' => array('slow' => $this->t('Slow'), 'fast' => $this->t('Fast')), '#default_value' => $this->getSetting('speed'), '#weight' => 6, '#states' => array('!visible' => array(':input[data-fieldgroup-selector="effect"]' => array('value' => 'none')))); return $form; }
/** * {@inheritdoc} */ public function settingsForm() { $form = parent::settingsForm(); $form['formatter'] = array('#title' => $this->t('Format'), '#type' => 'select', '#options' => array_combine($this->pluginDefinition['format_types'], $this->pluginDefinition['format_types']), '#default_value' => $this->getSetting('formatter'), '#weight' => -4); $form['label']['#description'] = $this->t('Please enter a label for collapsible elements'); $form['show_label'] = array('#title' => $this->t('Show label'), '#type' => 'select', '#options' => array(0 => $this->t('No'), 1 => $this->t('Yes')), '#default_value' => $this->getSetting('show_label'), '#weight' => 2); $form['label_element'] = array('#title' => $this->t('Label element'), '#type' => 'select', '#options' => array('h2' => $this->t('Header 2'), 'h3' => $this->t('Header 3')), '#default_value' => $this->getSetting('label_element'), '#weight' => 2); $form['effect'] = array('#title' => $this->t('Effect'), '#type' => 'select', '#options' => array('none' => $this->t('None'), 'blind' => $this->t('Blind')), '#default_value' => $this->getSetting('effect'), '#weight' => 3); $form['speed'] = array('#title' => $this->t('Speed'), '#type' => 'select', '#options' => array('none' => $this->t('None'), 'slow' => $this->t('Slow'), 'fast' => $this->t('Fast')), '#default_value' => $this->getSetting('speed'), '#weight' => 3); if ($this->context == 'form') { $form['required_fields'] = array('#type' => 'checkbox', '#title' => $this->t('Mark group as required if it contains required fields.'), '#default_value' => $this->getSetting('required_fields'), '#weight' => 2); } return $form; }
/** * {@inheritdoc} */ public function settingsForm() { $form = parent::settingsForm(); $form['direction'] = array('#title' => $this->t('Direction'), '#type' => 'select', '#options' => array('vertical' => $this->t('Vertical'), 'horizontal' => $this->t('Horizontal')), '#default_value' => $this->getSetting('direction'), '#weight' => 1); return $form; }
/** * {@inheritdoc} */ public function settingsForm() { $form = parent::settingsForm(); $form['open'] = array('#type' => 'checkbox', '#title' => t('Display element open by default.'), '#default_value' => $this->getSetting('open')); return $form; }
/** * {@inheritdoc} */ public function settingsForm() { $form = parent::settingsForm(); $form['effect'] = array('#title' => $this->t('Effect'), '#type' => 'select', '#options' => array('none' => $this->t('None'), 'bounceslide' => $this->t('Bounce slide')), '#default_value' => $this->getSetting('effect'), '#weight' => 2); return $form; }