Hi everyone!
In the midst of setting up a module, I have a form that is getting submitted to update settings. I want to display a success alert. I am having trouble figuring out how to go about the process with the CP/Alert Service.
My forms action is the following method:
public function save()
{
// Grab post input above and update database schema etc
ee('CP/Alert')->makeInline('alert')
->asSuccess()
->withTitle('Title test')
->addToBody('Description test')
->now();
ee()->functions->redirect($this->mcp_link);
}
But after being redirected to the main view, I see no notifications or alerts. What else needs to be added or returned to the view to display the message and what exactly is the process as it seems the setup is different from the flash messages in EE 2.X
I feel like something needs to be returned to the view and then check if there is a message to render or not.
Thanks in advance for any help!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.