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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bendev created an issue. See original summary.

bendev’s picture

FileSize
1.22 KB

renaming file

geerlingguy’s picture

Version: 7.x-1.21 » 7.x-1.x-dev
Status: Active » Needs review

@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?

Status: Needs review » Needs work

The last submitted patch, 2: validate-element-1.patch, failed testing.

geerlingguy’s picture

Status: Needs work » Closed (works as designed)

Closing as there's been no response for a while, and I'm not sure if this is a good idea to implement.