Problem/Motivation
Currently, the Signature element doesn't support Webform Conditions or ajax value change events.
Steps to reproduce
1. Create a new webform, add a Signature element and a Text field element
2. Make the Text field Visible condition depend on wether the Signature element is filled or empty
3. The condition doesn't work (neither do ajax events, etc.)
Proposed resolution
Trigger the change event when updating the associated input field value on webform.element.signature.js line 56.
Remaining tasks
I'm attaching a .patch that works on webform v6.2.9.
It if it's appropriate perhaps make the change in the dev branch of webform.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 2025-10-16_18-33-56 (1).gif | 336.95 KB | bartvermeulen1 |
| webform-allow-signature-notify-change.patch | 446 bytes | apparatchik |
Issue fork webform-3533744
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jrockowitz commentedPlease create an MR for webform 6.3.x and we can commit this improvement
Comment #4
jrockowitz commentedComment #7
jrockowitz commentedIf the tests pass. this is RTBC
Comment #10
jrockowitz commentedComment #13
bartvermeulen1 commentedThis change introduced some unwanted effect on tablets and mobile devices. From the moment you lift your finger, the signature gets smaller and pushed to left upper corner. When I remove the line that was introduced in this change, the behavior was back to normal.
Test was done with brand new Drupal 11 and webform 6.3 beta5.
Comment #14
aaronpinero commentedI can confirm the issue noted by bartvermeulen1 when using Webform on Drupal 10.5.4 and webform 6.3.0-beta5. If I comment out the line
$input.change();the problem goes away. This is a significant UX problem because for a typical user signature (first and last name), a person will create at least 4 strokes in the signature. This results in a very weird user experience and a very tiny signature.
Comment #15
jrockowitz commentedI reverted the commit. I am going to reopen this ticket but multiple people will need to confirm that this regression has been addressed before moving forward.