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:

Form Questions /

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

Clearig Form Messages

Go to End

3 Posts   1095 Views


Community Member, 545 Posts

15 April 2014 at 6:16am

I has a custom form that I return a message to when the submission succeds, how to do I clear that message on subsequent page load so its not always there?


Forum Moderator, 267 Posts

15 April 2014 at 11:07am

Can you provide more information like the form code or how you set the message after the form submission?

Are you using $form->sessionMessage()?


Community Member, 545 Posts

16 April 2014 at 1:35am

Right now I'm using

$form->addErrorMessage('Message', 'Message Body' , 'success');

I guess I'll try sessionMessage()