Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Session setFormMessage

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

Page: 1
Go to End
Author Topic: 407 Views
  • spierala
    Community Member
    80 Posts

    Session setFormMessage Link to this post

    I was just building a custom form in SS3 as described here:


    works far so fine. Now I´m setting the message which is going to be displayed after submit like that:

    Session::setFormMessage($form->FormName(), "Thank You.", "good");

    Now the annoying thing is that the message is displayed forever even when the form is reloaded.
    How can I make that message disappear after reload?

    here the template code:

    <% if Message %>
    <p id="{$FormName}_error" class="message $MessageType">$Message</p>
    <% else %>
    <p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
    <% end_if %>

    Thank you,

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.