Hello,
There is an issue when honeypot is used together with IFE (Inline form errors)
CAUSE the form_set_error in the validate HOOK of honeypot don't specify the name argument
form_set_error('', ...)
Issue: IFE exits the ife_element_errors_set function too early , when it encounters the honeypot element and misses the other errors on other form elements. This prevents the error styles to be applied on these other form elements
SOLUTION
A better approach ssems to be to replace it by form_error to specify the error on the exact element
form_error($element, t('There was a problem with your form submission. Please wait @limit seconds and try again.', array('@limit' => $time_limit)));
See patch attached.
Comment | File | Size | Author |
---|---|---|---|
#2 | validate-element-1.patch | 1.22 KB | bendev |
Comments
Comment #2
bendev CreditAttribution: bendev at WebstanZ commentedrenaming file
Comment #3
geerlingguy CreditAttribution: geerlingguy as a volunteer commented@bendev - The problem with this approach is that it attaches the error to what should be a hidden field. Does this have the potential for exposing the form fields to the end user, since it's adding an error class?
Comment #5
geerlingguy CreditAttribution: geerlingguy as a volunteer commentedClosing as there's been no response for a while, and I'm not sure if this is a good idea to implement.