diff --git a/code/UserDefinedForm.php b/code/UserDefinedForm.php index 07d5c93..03c657e 100755 --- a/code/UserDefinedForm.php +++ b/code/UserDefinedForm.php @@ -821,8 +821,8 @@ class UserDefinedForm_EmailRecipient extends DataObject { ); if($this->Form()) { - $validEmailFields = DataObject::get("EditableEmailField", "\"ParentID\" = '$this->FormID'"); - $multiOptionFields = DataObject::get("EditableMultipleOptionField", "\"ParentID\" = '$this->FormID'"); + $validEmailFields = DataObject::get("EditableEmailField", "\"ParentID\" = '" . (int)$this->FormID . "'"); + $multiOptionFields = DataObject::get("EditableMultipleOptionField", "\"ParentID\" = '" . (int)$this->FormID . "'"); // if they have email fields then we could send from it if($validEmailFields) {