Custom redirect after backend form save
Ad
Its possible to set the redirect
and redirectClose
attributes in the form configuration file to use custom redirects in create and update pages in the backend.
But is it possible to conditionally change where the user is redirected after form save? Lets say based on some GET parameters.
Maybe somehow in the controller? Or create/update view?
Ad
Answer
Ad
You can override Controller functions create_onSave, update_onSave like that
public function create_onSave($context = null)
{
parent::create_onSave($context);
return \Backend::redirect($your_custom_url);
}
Ad
source: stackoverflow.com
Related Questions
Ad
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page
Ad