public static function WebformComputedBase::validateWebformComputed in Webform 6.x
Same name in this branch
- 6.x src/Element/WebformComputedBase.php \Drupal\webform\Element\WebformComputedBase::validateWebformComputed()
- 6.x src/Plugin/WebformElement/WebformComputedBase.php \Drupal\webform\Plugin\WebformElement\WebformComputedBase::validateWebformComputed()
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/WebformComputedBase.php \Drupal\webform\Plugin\WebformElement\WebformComputedBase::validateWebformComputed()
Form API callback. Removes ignored element for $form_state values.
File
- src/
Plugin/ WebformElement/ WebformComputedBase.php, line 251
Class
- WebformComputedBase
- Provides a base class for 'webform_computed' elements.
Namespace
Drupal\webform\Plugin\WebformElementCode
public static function validateWebformComputed(array &$element, FormStateInterface $form_state, array &$completed_form) {
if (empty($element['#store'])) {
// Unset the value from the $form_state to prevent modules from relying
// on this value.
$key = $element['#webform_key'];
$form_state
->unsetValue($key);
}
}