I would like to find a way to remove the disabled
attribute from webform fields inside a custom Handler.
The disabled
attribute is currently being applied to webform elements during user input via conditions/states
with the UI and I would like to remove this attribute after clicking submit so that these webform fields will submit their values.
I've been looking through the available functions from the WebformhandlerBase
: https://git.uwaterloo.ca/drupal-org/webform/blob/8.x-5.9/src/Plugin/WebformHandlerBase.php, but can't find where this attribute exists, and don't see an approach to alter/remove it.
public function validateForm() {}
seems like a good moment in time to alter, but I can't find this attribute.
Noting I have success doing this with jQuery but would prefer doing this in my custom Handler
How do you remove a form field attribute (disabled
) with a custom Handler after a user clicks submit?
Clear value(s) when hidden
checkbox every element has under its "Conditions" tab and uncheck that, or are you?