Alter element¶
Available since: 1.0.0
Provided tokens
| Token | Description |
|---|---|
[event] |
The event. |
[event:webform] |
The webform. |
[event:webform:access_rules] |
The access rules. |
[event:webform:context] |
The webform context. |
[event:webform:element] |
The form element. |
[event:webform:form_state] |
The form state object. |
[event] |
The event. |
[event:machine_name] |
The machine name of the ECA event. |
[session_user] |
The user account that dispatched the event, regardless if ECA is processing models under a different account. This is only available if ECA is configured to always run under a specific account. |
Fires for every element in a webform during form preparation. This is one of the most commonly used webform events for modifying element properties (labels, placeholders, default values, attributes) or attaching custom JavaScript behaviors.
High frequency
This event fires once per element in the form tree. Use conditions to target specific elements and keep reactions lightweight.