public static function Button::processButton in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Render/Element/Button.php \Drupal\Core\Render\Element\Button::processButton()
Processes a form button element.
File
- core/
lib/ Drupal/ Core/ Render/ Element/ Button.php, line 65 - Contains \Drupal\Core\Render\Element\Button.
Class
- Button
- Provides an action button form element.
Namespace
Drupal\Core\Render\ElementCode
public static function processButton(&$element, FormStateInterface $form_state, &$complete_form) {
// If this is a button intentionally allowing incomplete form submission
// (e.g., a "Previous" or "Add another item" button), then also skip
// client-side validation.
if (isset($element['#limit_validation_errors']) && $element['#limit_validation_errors'] !== FALSE) {
$element['#attributes']['formnovalidate'] = 'formnovalidate';
}
return $element;
}