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.
After updating to the last hide_submit version last week we're experiencing javascript errors on some pages. This is because hook_form_alter is only fired on non-cached forms. I'm not sure if this is a quirk of our site or a drupal thing, but I created a patch which replaces drupal_add_js with $form{'#attached'] that fixes the problem for us.
Comment | File | Size | Author |
---|---|---|---|
#2 | use_form_attached_for-2833453-2.patch | 1.43 KB | SpaghettiBolognese |
Comments
Comment #2
SpaghettiBolognese CreditAttribution: SpaghettiBolognese at Emble commentedComment #3
jjsanz CreditAttribution: jjsanz commentedThis patch solved the problem for me.