From b3af63e38721de2cd6237fd39f8aeeef45ff6578 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Sat, 15 Feb 2014 23:00:42 +1300 Subject: [PATCH] ID can be used to validate object --- code/extensions/FormSpamProtectionExtension.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/extensions/FormSpamProtectionExtension.php b/code/extensions/FormSpamProtectionExtension.php index ebf7fe9..946b9de 100644 --- a/code/extensions/FormSpamProtectionExtension.php +++ b/code/extensions/FormSpamProtectionExtension.php @@ -34,6 +34,7 @@ class FormSpamProtectionExtension extends Extension { * @var array $mappable_fields */ private static $mappable_fields = array( + 'id', 'title', 'body', 'contextUrl', @@ -84,6 +85,8 @@ class FormSpamProtectionExtension extends Extension { // add the form field if($field = $protector->getFormField($name, $title)) { + $field->setForm($this->owner); + $this->owner->Fields()->push($field); }