HiddenElement.php in Form Builder 7.2
File
modules/webform/src/HiddenElement.php
View source
<?php
namespace Drupal\form_builder_webform;
class HiddenElement extends Element {
public function configurationForm($form, &$form_state) {
$form = parent::configurationForm($form, $form_state);
$form['default_value']['#type'] = 'textarea';
$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;
}
public function configurationSubmit(&$form, &$form_state) {
parent::configurationSubmit($form, $form_state);
$this->element['#webform_component']['extra']['hidden_type'] = $form_state['values']['extra']['hidden_type'];
}
}