Skip to content

Instantly share code, notes, and snippets.

@Greg-Boggs
Forked from anonymous/gist:eda2facf47642acc2446
Last active August 29, 2015 14:09
Show Gist options
  • Save Greg-Boggs/b706a3feb0a3ad830cb9 to your computer and use it in GitHub Desktop.
Save Greg-Boggs/b706a3feb0a3ad830cb9 to your computer and use it in GitHub Desktop.
Alter a campaign monitor form to include honey pot.
<?php
function tng_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'campaignmonitor-subscribe-form') {
honeypot_add_form_protection($form, $form_state, array('honeypot', 'time_restriction'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment