Server side validation

Last updated on
11 March 2021

This page has not yet been reviewed by Honeypot maintainer(s) and added to the menu.

This documentation needs work. See "Help improve this page" in the sidebar.

Overview

As an advanced optional feature, Honeypot allows adding server-side validation by using unique token per form submission. This implementation is based on the Drupal 7 Hidden Captcha module.

Caching can be a problem if the field value gets cached and used by multiple users, so the page caching should be disabled if server-side validation is enabled.

Configuration

To enable this feature, follow these steps:

  1. Login as an administrative user on your Drupal site.
  2. Navigate as follows: Configuration > Content authoring > Honeypot configuration.
  3. Click on the checkbox corresponding to `Advanced validation`.
  4. Save the settings.
  5. Clear your site cache.

This will enable the new validation, and add another field to the form which will contain the new token.

Considerations

This field is based on session data, so there might be issues with anonymous users using forms in Incognito mode.

The honeypot_add_form_protection() function now has a new parameter which is the Form ID. If you have a custom integration of this function, please make sure to send the new parameter to it.

Help improve this page

Page status: Needs work

You can: