function getRecaptchaField() { $field = null; $spamProtector = SpamProtectorManager::get_spam_protector(); if ($spamProtector == "RecaptchaProtector") { $field = new RecaptchaField("Recaptcha", "Please enter text"); $field->jsOptions = array('theme' => 'clean'); $field->addExtraClass("required"); } return $field; }