Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
Webform Ajax does not work with and Antibot. When the form is submitted the following error shows up:
Uncaught TypeError: Cannot read property 'top' of undefined
at Drupal.AjaxCommands.webformScrollTop (webform.ajax.js?v=8.3.3:166)
at Drupal.Ajax.success (ajax.js?ory09m:155)
at Object.success (ajax.js?v=8.3.3:505)
at Object.t.success (jquery.form.min.js?v=3.51:11)
at i (jquery.min.js?v=2.2.4:2)
at Object.fireWith [as resolveWith] (jquery.min.js?v=2.2.4:2)
at z (jquery.min.js?v=2.2.4:4)
at XMLHttpRequest.<anonymous> (jquery.min.js?v=2.2.4:4)
Thank you
Comment | File | Size | Author |
---|---|---|---|
#6 | webform_ajax_and-2888403-6.patch | 759 bytes | jrockowitz |
#3 | webform_ajax_and-2888403-3.patch | 740 bytes | jrockowitz |
Screenshot from 2017-06-22 12-49-07.png | 151.45 KB | gge |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe problem is that Antibot is replacing the form's #prefix when it should be appending the antibot message to the form's #prefix.
Please see the attached patch.
Comment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #5
mstef CreditAttribution: mstef commentedI think I'd prefer to have antibot prepend rather than append. Can you test if that works as well, and if so, update the patch please?
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedPrepending works fine.
Comment #7
gge CreditAttribution: gge commentedThank you for fixing this! It works as expected.
Comment #10
mstef CreditAttribution: mstef commented