Created
July 11, 2014 04:56
-
-
Save wilr/2bce78e9a95e2c03b0db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/code/model/UserDefinedForm.php b/code/model/UserDefinedForm.php | |
index 9f96dd7..58e91d6 100755 | |
--- a/code/model/UserDefinedForm.php | |
+++ b/code/model/UserDefinedForm.php | |
@@ -1055,6 +1055,8 @@ JS | |
} | |
} | |
+ Session::set('LastSubmissionFor'. $this->ID, serialize($submittedForm)); | |
+ | |
return $this->redirect($this->Link('finished') . $referrer); | |
} | |
@@ -1066,8 +1068,13 @@ JS | |
*/ | |
public function finished() { | |
$referrer = isset($_GET['referrer']) ? urldecode($_GET['referrer']) : null; | |
- | |
$formProcessed = Session::get('FormProcessed'); | |
+ | |
+ $submission = Session::get('LastSubmissionFor'. $this->ID); | |
+ if($submission) { | |
+ $submission = unserialize($submission); | |
+ } | |
+ | |
if (!isset($formProcessed)) { | |
return $this->redirect($this->Link() . $referrer); | |
} else { | |
@@ -1087,7 +1094,8 @@ JS | |
return $this->customise(array( | |
'Content' => $this->customise( | |
array( | |
- 'Link' => $referrer | |
+ 'Link' => $referrer, | |
+ 'Submission' => $submission | |
))->renderWith('ReceivedFormSubmission'), | |
'Form' => '', | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment