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.

Form Questions /

Please Help-Blank Page in Admin Menu on Form Submit


Reply


2 Posts   1173 Views

Avatar
bharath

Community Member, 3 Posts

2 May 2009 at 4:16pm

Blank Page in Admin Menu on Form Submit Link to this post

30 April 2009 at 6:35pm
edit Mark as Spam

Hi all,

I am New to silverstripe and my version silverstripe 2.2.3

I am experiencing the problem when ever i submit the form page such as contact or subscribe page all the details are saving in database but creating a new blank page on Admin Menu.

Please help to get out of this problem

Avatar
Hamish

Community Member, 712 Posts

5 June 2009 at 4:34pm

Most probably, you are not returning anything from the action that saves the data.

For example, if the action is called doSave:

function doSave($form, $data) {

   // Save your data

   return array();
}

The return call gives sapphire something to render. Alternatively, you could do:

   return $this->renderWith(array('DataSaved', 'Page'));

to return the DataSaved template.

You could also solve the problem by creating a template with the name of the page and action:

Page_doSave.ss

This becomes the default template for this action.