Closed (fixed)
Project:
Hashcash
Version:
7.x-2.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2013 at 21:30 UTC
Updated:
30 Apr 2013 at 09:10 UTC
Jump to comment: Most recent file
After installing hashcash module, I notice that forms on my site appear differently. Disabling hashcash reverts them to their original state. Using "inspect element" I discover that attributes from my form tags have been discarded. Importantly, "class" has disappeared.
In hashcash_form_alter, instead of setting form['#attributes'], which overwrites the entire contents of form['#attributes'], set $form['#attributes']['onsubmit']
I will attach a patch; please review my code; I'm not a PHP expert, or a Drupal expert. I'm not sure of the full ramifications, but this seems to fix it for me.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | retain-form-attributes-issue-number-1960596.patch | 605 bytes | mozz100 |
Comments
Comment #1
mozz100 commentedPatch attached for 7.x-2.x branch
Comment #2
sdrycroft commentedI've just added this to the repository, and will make a release shortly. Thanks very much for the patch.
Simon