getSavedSteps(); $savedData = array(); foreach ($savedSteps as $step) { $savedData = array_merge($savedData, $step->loadData()); } $fields = new FieldList(); $fields->push(new LiteralField("Heading", "
$key $value
")); } Session::set("MultiFormMessage", "Your information has been submitted."); return $this->Controller()->redirect(Director::BaseURL() . $this->Controller()->URLSegment); } } class TestMultiFormStepOne extends MultiFormStep { public static $next_steps = 'TestMultiFormStepTwo'; public function getFields() { return new FieldList( new TextField('FirstName', 'First name'), new TextField('Surname', 'Surname') ); } } class TestMultiFormStepTwo extends MultiFormStep { public static $next_steps = 'TestMultiFormStepThree'; public function getFields() { return new FieldList( new TextField('Email', 'Email'), new TextField('Address', 'Address') ); } } class TestMultiFormStepThree extends MultiFormStep { public static $is_final_step = true; public function getFields() { $form = $this->getForm(); $savedSteps = $form->getSavedSteps(); $savedData = array(); foreach ($savedSteps as $step) { $savedData = array_merge($savedData, $step->loadData()); } $fields = new FieldList(); $fields->push(new LiteralField("Heading", "$key $value
")); } return $fields; } }