Welcome Guest, Not a member yet? Register   Sign In
form generation library - how to display success message?
#1

[eluser]Unknown[/eluser]
Hi,

I'm using form generation library to create forms.
Everyting is fine except one thing.

I have a form:
Code:
$this->form
    ->hidden('module', 0)
    ->hidden('join_lang', 'pl')
    ->text('join_name', 'Nazwa kategorii', 'required|trim|xss_clean')
    ->text('join_link', 'Slug', 'required|trim|xss_clean')
    ->select('id_parent', $select_cat, 'Rodzic')
    ->text('ordr', 'Kolejność', 'numeric|trim|xss_clean')
    ->textarea('join_text', 'Opis', 'trim|xss_clean')
    ->textarea('join_meta_title', 'Meta title', 'trim|xss_clean')
    ->textarea('join_meta_keywords', 'Meta keywords', 'trim|xss_clean')
    ->textarea('join_meta_description', 'Meta description', 'trim|xss_clean')
    ->model('Category', 'add_new')
    ->submit('Dodaj kategorię')
    ->onsuccess('redirect', 'categories');

$data['category_add_form'] = $this->form->get();
$data['errors'] = $this->form->errors;

$this->load->view('test', $data);

Now onsuccess its redirect to the categories page, but what I would like is to
not to redirect, stay on the same page and display success message above the form
(something like errors but for example in green color).

My question is how to do this?

thanks!


Messages In This Thread
form generation library - how to display success message? - by El Forum - 05-21-2012, 12:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB