public static function WebformSignature::processWebformSignature in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Element/WebformSignature.php \Drupal\webform\Element\WebformSignature::processWebformSignature()
Processes a signature webform element.
File
- src/
Element/ WebformSignature.php, line 42
Class
- WebformSignature
- Provides a webform element for entering a signature.
Namespace
Drupal\webform\ElementCode
public static function processWebformSignature(&$element, FormStateInterface $form_state, &$complete_form) {
// Remove 'for' from the element's label.
$element['#label_attributes']['webform-remove-for-attribute'] = TRUE;
// Add validate callback.
$element += [
'#element_validate' => [],
];
array_unshift($element['#element_validate'], [
get_called_class(),
'validateWebformSignature',
]);
return $element;
}