public static function WebformSubmissionViews::emptyValue in Webform 8.5
Same name and namespace in other branches
- 6.x 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, []);
}