Sometimes people will replace the default input type='submit' in a theme's twig template files, by a button element to always create a button-tag when a submit is output. Eg. because it give more options for theming.
However, setting a 'disabled' condition on the submit, does not result in a disabled property being set on said button.
This is because, in the webform.states.js file, only 'select, input, textarea' are in-scope for setting a disabled state on.
There's 2 ways around this:
- either expand the scope of the jQuery 'find' to include 'button' (easy)
- or do a 'find' on a common property instead of a tag-name (complex, because need refactoring on multiple levels)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3010192-setting-disabled-state-condition-on-button.patch | 723 bytes | rembrandx |
Comments
Comment #2
rembrandx commentedAlright, added a patch to extend the scope of the elements to include 'button'
Comment #4
jrockowitz commentedThanks for the patch.