Jump to:

2002 Posts in 1422 Topics by 616 members

Form Questions

SilverStripe Forums » Form Questions » Clearig Form Messages

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

Page: 1
Go to End
Author Topic: 354 Views
  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Clearig Form Messages Link to this post

    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?

  • camfindlay
    Avatar
    Forum Moderator
    146 Posts

    Re: Clearig Form Messages Link to this post

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

    Are you using $form->sessionMessage()?

  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: Clearig Form Messages Link to this post

    Right now I'm using

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

    I guess I'll try sessionMessage()

    354 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.