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)

Comments

lordrembo created an issue. See original summary.

rembrandx’s picture

Alright, added a patch to extend the scope of the elements to include 'button'

  • jrockowitz committed 6f612c3 on 8.x-5.x authored by lordrembo
    Issue #3010192 by lordrembo: Setting a disabled state condition doesn't...
jrockowitz’s picture

Status: Active » Fixed

Thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.