Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Enforce anti-spam honeypot on all Gravity Forms forms
<?php
/**
* Enforce anti-spam honeypot on all Gravity forms.
*
* @param array $form
*
* @return array $form
*/
add_filter( 'gform_form_post_get_meta', function ( $form ) {
$form['enableHoneypot'] = true;
return $form;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment