You are here

public function WebformHandlerInterface::alterElement in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformHandlerInterface.php \Drupal\webform\Plugin\WebformHandlerInterface::alterElement()

Alter webform element.

Parameters

array $element: The webform element.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

array $context: An associative array containing the following key-value pairs:

  • form: The form structure to which elements is being attached.

See also

\Drupal\webform\WebformSubmissionForm::prepareElements()

hook_webform_element_alter()

1 method overrides WebformHandlerInterface::alterElement()
WebformHandlerBase::alterElement in src/Plugin/WebformHandlerBase.php
Alter webform element.

File

src/Plugin/WebformHandlerInterface.php, line 383

Class

WebformHandlerInterface
Defines the interface for webform handlers.

Namespace

Drupal\webform\Plugin

Code

public function alterElement(array &$element, FormStateInterface $form_state, array $context);