0

I am using the iCheck module for checkboxes, and the checkbox is initially hidden by the Webform module. Somehow, the Webform module also sets it to disabled while hidden, which is nice.

Once it gets shown, the disabled status is removed from the webform, but the iCheck module doesn't notice. Calling iCheck.update() fixes it, but I need to catch an event to do that.

Are there JavaScript events sent by a webform conditionals?

0

The Webform module for Drupal 8 is using Drupal's States API, which triggers custom events that are prefixed with 'state:*'.

Events include...

  • state:disabled
  • state:required
  • state:visible
  • state:checked
  • state:collapsed
  • Drupal's States API has not changed much since D7. I think these events or something very similar is still applicable. – jrockowitz Dec 5 '17 at 19:15
  • I tried to catch state:visible (on body and html) but caught nothing. where does the event go ? or better, where is this documented ? – commonpike Dec 5 '17 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.