1. Docs
  2. Add Ons
  3. Send To Friend
  4. Adding a ReCAPTCHA field to the form

Adding a ReCAPTCHA field to the form

Once you've obtained your API keys here you can simply add the following to your theme's functions.php file:

add_filter( 'propertyhive_send_to_friend_form_fields', 'add_recaptcha_to_send_to_friend_form', 10, 1 );
function add_recaptcha_to_send_to_friend_form( $fields )
{
    $fields['recaptcha'] = array(
        'type' => 'recaptcha',
        'site_key' => 'your-key-here',
        'secret' => 'your-secret-here',
    );
    return $fields;
}

Please note this functionality requires Property Hive version 1.4.22 or later and Send To Friend add on version 1.0.4 or later.

Was this article helpful to you? Yes No