Hello, I have a custom CMS page, with a CMSForm - the action is saving and processing nicely. I'm pretty excited about that (first time I'm extending a CMS page, so - yay!)
Now.. after saving, I'd like to show a success notice in the CMS. So:
* Can someone show me how to call a "statusMessage" (JS) from the PHP. Is it a return, an echo... I'm a bit confused about how those things tie together.
* How do I pass a message into a form from the form PHP callback?
I tried:
public function doSaveSettings($data, Form $form) {
$form->setMessage("This is cool","good");
$this->redirectBack();
}
But it's not passing. I'm feeling funny doing all kinds of crazy thigs with SS through these years but I still can't do this :) Thank you everyone!
EDIT:
This 2nd part, because of the redirect, one needs to set a sessionMessage on the form, so $form->sessionMessage($message, $type).