Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Saving into the multi form

Go to End

4 Posts   1450 Views


Community Member, 165 Posts

2 November 2010 at 2:00am

Hi there,

I've used the Multi form module in the past once before but an earlier version. I'm just looking through the docs and there doesn't seem to be a proper explanation of how to save the data for each step of the form, instead it just talks about the "Member" and "Organisation" dataobjects.

I've been using this

				if($step->class == 'StartCaseStep') {
					$StartCase = new StartCase();
					$data = $step->loadData();

...but to no avail

Any help here is greatly appreciated



Community Member, 165 Posts

4 November 2010 at 12:06am

Really stuck on this, if any one could help that would be great.


Community Member, 165 Posts

4 November 2010 at 2:40pm

Sorry to be going on about this again but...

Anyone got any idea when the documentation is going to be extended to include how to "saveInto" with this form? I noticed it on the to do list but I'm getting really curious.

I can't seem to get the steps to save because I'm getting a "Fatal error: Call to a member function saveInto() on a non-object" which suggests to me that it cannot find the table to write into.

When I browse the database using phpMyAdmin I noticed that the class name and the table name are different? I have named the class names with the word "step" appended, eg "FirstStep" but in the database the table name will be "First". Could this be the conflict?



Community Member, 254 Posts

27 November 2010 at 10:29pm

Hi Harley,
did you get to the bottom of the error?

Is the example code in your first post in the form action function?
saveInto takes a maped object and auto populates the dataobjects fields.

From the api "Save the contents of this form into the given data object."

Here is a basic example I've been working on
* This function is called when the user submits the form.
function UpdateAction($data, $form) {
if($member = Member::currentUser()) {

You can either use the form object to saveInto or use the dataobjects update funtion

$DataObject = get_one('DataObject');