currently getting this error while trying to setup Math Spam Protection really don't know where to go from here.
Fatal error: Declaration of MathSpamProtector::getFormField() must be compatible with that of SpamProtector::getFormField() in /home/ifif1773/public_html/silverstripe/mathspamprotection/code/MathSpamProtector.php on line 7
Running SS 3.1
Have both required modules installed
contact.php
public function ContactForm() {
$fields = new FieldList(
new TextField('Name', 'Your Full Name'),
new EmailField('Email', 'Your Email'),
new TextField('Phone', 'Your Phone No.'),
new TextField('Subject', 'The Subject'),
new TextareaField('Message','Message')
);
$validator = new RequiredFields(array('Name','Email','Message'));
$actions = new FieldList(FormAction::create("sendEmail")->setTitle("Send Email"));
$form = new Form($this, 'ContactForm', $fields, $actions, $validator);
// enable MathSpamProtection
$protector = SpamProtectorManager::update_form($form);
return $form;
}
contact.ss
$ContactForm
mysite/config
//Set Spam Protection
SpamProtectorManager::set_spam_protector('MathSpamProtector');
I should note that the form works fine without the:
// enable MathSpamProtection
$protector = SpamProtectorManager::update_form($form);