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.

Customising the CMS /

sessionMessage without Form


Reply


4 Posts   2013 Views

Avatar
dirkr

Community Member, 2 Posts

16 May 2009 at 2:20am

Hi,

is there a way to send a sessionMessage without a form.
It is supposed to be a response to an action.

Thanks,
Dirkr

Avatar
PGiessler

Community Member, 47 Posts

23 May 2009 at 8:32pm

Hi,

you can check this with PHP, if you have access to this method without create the object form.If this doesn't work, you can create a Javascript or you create a simple PHP method to send a response like sessionMessage.

Best regards,

Pascal

Avatar
dirkr

Community Member, 2 Posts

24 May 2009 at 9:41pm

Edited: 24/05/2009 9:43pm

Thanks for your response,

I was hoping there was something already built in ;-)
Sth like the flash technique in Rails, where a message could be saved in the session and would be shown on the next page.

Have fun,
Dirkr

Avatar
cobianzo

Community Member, 8 Posts

12 September 2010 at 6:58am

Edited: 12/09/2010 6:59am

I don't know if there's a way already set in SS to do it, but alternatively you can set the variable session in PHP.

$FormInfo = array("NameOfTheFormOrWhatever" => array("formError" => array( "message" => "your message", "type" => "good")) );

Session::set("FormInfo", array_merge( Session::get("FormInfo"), $FormInfo ) );

The array_merge thing is just to not overwrite other form variables in case there were.

I guess you probably new this. But just in case I post it.