Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

how can I show the list after submit?

edited August 2011 in Modules
I want after submit to show the message and show the list instead the form
how can I do that?

I have done the advance modules tutorial, in the class_model using on_after_save
how can I show the list and the OK message instead the form?


  • suwsuw
    edited August 2011
  • edited 4:29AM
    you could try manipulating your model's form_fields() method to look for a flash variable set in your on_after_save hook:
    function form_fields($values = array(), $related = array()) { $this->load->library('session'); if ($this->session->flash data('show_list')){ // ... put your list code here... } else { $fields = parent::form_fields($values, $related); // .... other field changes return $fields; } }
  • suwsuw
    edited 4:29AM
    OK good point - thank you, I did that and it's ok, just that
    I really don't know how to call and render the list instead form.
    (the //... put your list code here... is my unknown part)

    I don't understand how to render the content of list, somehow I have to tell to parent class that instead edit or create to render list
Sign In or Register to comment.