class HiddenElement in Form Builder 7.2
Special behaviour for hidden elements.
Hierarchy
- class \Drupal\form_builder\ElementBase implements ElementInterface
- class \Drupal\form_builder_webform\Element
- class \Drupal\form_builder_webform\HiddenElement
- class \Drupal\form_builder_webform\Element
Expanded class hierarchy of HiddenElement
1 file declares its use of HiddenElement
- form_builder_webform.components.inc in modules/
webform/ form_builder_webform.components.inc - Default webform component callbacks for functionality related to the Form Builder.
File
- modules/
webform/ src/ HiddenElement.php, line 8
Namespace
Drupal\form_builder_webformView source
class HiddenElement extends Element {
/**
* {@inheritdoc}
*/
public function configurationForm($form, &$form_state) {
$form = parent::configurationForm($form, $form_state);
// Configure default value as textarea to allow for more data.
$form['default_value']['#type'] = 'textarea';
// Add configuration for $component['extra']['hidden_type'].
$display['#form_builder']['property_group'] = 'display';
$e = webform_component_invoke('hidden', 'edit', $this->element['#webform_component']);
$form['hidden_type'] = $e['display']['hidden_type'] + $display;
return $form;
}
/**
* {@inheritdoc}
*/
public function configurationSubmit(&$form, &$form_state) {
parent::configurationSubmit($form, $form_state);
$this->element['#webform_component']['extra']['hidden_type'] = $form_state['values']['extra']['hidden_type'];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Element:: |
protected | function | Generate the component edit form for this component. | |
Element:: |
public | function |
Get the element’s form key. Overrides ElementBase:: |
|
Element:: |
public | function |
(Re-)Render an element. Overrides ElementBase:: |
|
Element:: |
protected | function |
Set the value of a property. Overrides ElementBase:: |
|
Element:: |
public | function |
Get a human-readable title for this form element. Overrides ElementBase:: |
|
ElementBase:: |
protected | property | ||
ElementBase:: |
protected | property | ||
ElementBase:: |
protected | property | ||
ElementBase:: |
protected | property | ||
ElementBase:: |
protected | function | Add our pre-render function to the element-array. | |
ElementBase:: |
public | function |
Get a list of properties available for this element. Overrides ElementInterface:: |
|
ElementBase:: |
public | function |
Get a list of properties that are supported in any way by this element. Overrides ElementInterface:: |
|
ElementBase:: |
public | function | ||
ElementBase:: |
public | function |
Overrides ElementInterface:: |
|
HiddenElement:: |
public | function |
Get the configuration form for this element. Overrides Element:: |
|
HiddenElement:: |
public | function |
Submit handler for the configuration form. Overrides ElementBase:: |