public static function WebformSubmissionViews::emptyValue in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Element/WebformSubmissionViews.php \Drupal\webform\Element\WebformSubmissionViews::emptyValue()
Form validate callback which clears the submitted value.
File
- src/
Element/ WebformSubmissionViews.php, line 185
Class
- WebformSubmissionViews
- Provides a form element for selecting webform submission views.
Namespace
Drupal\webform\ElementCode
public static function emptyValue(&$element, FormStateInterface $form_state, &$complete_form) {
$element['#value'] = [];
$form_state
->setValueForElement($element, []);
}