From bf391697fabb5444fec31de752c807afb6ff8646 Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Sun, 2 Apr 2017 23:35:16 +0100 Subject: [PATCH] Fix casting bug with email previews (#549) --- code/model/recipients/UserFormRecipientItemRequest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/model/recipients/UserFormRecipientItemRequest.php b/code/model/recipients/UserFormRecipientItemRequest.php index 7a03dc8..ef125da 100644 --- a/code/model/recipients/UserFormRecipientItemRequest.php +++ b/code/model/recipients/UserFormRecipientItemRequest.php @@ -39,10 +39,10 @@ class UserFormRecipientItemRequest extends GridFieldDetailForm_ItemRequest { foreach ($fields as $field) { $data->push(new ArrayData(array( - 'Name' => $field->Name, - 'Title' => $field->Title, - 'Value' => '$' . $field->Name, - 'FormattedValue' => '$' . $field->Name + 'Name' => $field->dbObject('Name'), + 'Title' => $field->dbObject('Title'), + 'Value' => DBField::create_field('Varchar', '$' . $field->Name), + 'FormattedValue' => DBField::create_field('Varchar', '$' . $field->Name) ))); }