After 'Save' or 'Create' go to list view page automatically with success message
Currently If i create a new record then i go to edit page and show save message. But i want to go to list view page after create new record and want to show success message. How can i do that. I think for that i have to use on_after_save() and flash_userdata(). I am not sure. if i am correct then what is the flash_userdata() paramiter. Please help me.
Comments
If you are using the FUEL 1.0 beta (https://github.com/daylightstudio/FUEL-CMS/tree/1.0), you can use the Fuel_admin object like so, with one of the following options Fuel_admin::NOTIFICATION_SUCCESS, Fuel_admin::NOTIFICATION_ERROR, Fuel_admin::NOTIFICATION_WARNING, Fuel_admin::NOTIFICATION_INFO:
function on_after_post($values) { $this->fuel->admin->set_notification($msg, Fuel_admin::NOTIFICATION_SUCCESS); }
If you are using 0.93, you can use the "success" or "error" or "info"
function on_after_post($values) { $this->session->set_flashdata('success', 'Your message here'); }