From e4e43ee4afb3c8fc9988c27f193a14622c0ab44e Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 5 Jun 2008 01:13:55 +0000 Subject: [PATCH] ENHANCEMENT prev() now saves the current step data, exactly as next() does --- code/MultiForm.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/MultiForm.php b/code/MultiForm.php index 5dec3d9..bd002e5 100644 --- a/code/MultiForm.php +++ b/code/MultiForm.php @@ -411,6 +411,9 @@ abstract class MultiForm extends Form { // Switch the step to the previous! $prevStepClass = $this->getCurrentStep()->getPreviousStep(); + // Save the form data for the current step + $this->save($data); + // Get the previous step of the class instance returned from $currentStep->getPreviousStep() $prevStep = DataObject::get_one($prevStepClass, "SessionID = {$this->session->ID}");