From 958e68b0df26743eb2712ef5cfa7dcf166698267 Mon Sep 17 00:00:00 2001 From: John Milmine Date: Fri, 23 May 2014 15:55:53 +1200 Subject: [PATCH] added functionality to submitted form field allowing it to find the equivalent editable form field --- code/model/submissions/SubmittedFormField.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/model/submissions/SubmittedFormField.php b/code/model/submissions/SubmittedFormField.php index df693dc..3285005 100755 --- a/code/model/submissions/SubmittedFormField.php +++ b/code/model/submissions/SubmittedFormField.php @@ -78,4 +78,9 @@ class SubmittedFormField extends DataObject { public function getExportValue() { return $this->Value; } + public function getEditableField() { + return $this->Parent()->Parent()->Fields()->filter(array( + 'Name' => $this->Name + ))->First(); + } }