How to create a Simple news letter submit

edited August 2014 in News & Announcements
Hi, I need a simple form in client side, that takes a text field parameter and when user submit, it will store in the database, later admin can view in CMS.

How can I achieve this?


  • edited 5:19PM
    For the client side, you can do a normal CI controller and use something like form_builder. Here is an example from an older version of FUEL:

    The syntax for rendering a page has changed since then and is a lot simple so you can change this:
    // CHANGE THIS $page_init = array('location' => 'contact'); $this->load->module_library(FUEL_FOLDER, 'fuel_page', $page_init); $this->fuel_page->add_variables($vars); $this->fuel_page->render(); //TO JUST $this->fuel->pages->render('contact', $vars);
  • edited 5:19PM
    Thanks. What about the backend. I need to get all email address from Database.
  • edited 5:19PM
    If you are wanting the be able to export the contacts entered into a database, you can set the parameter "exportable" on your module. This will create a button in the list view called "Export" which will output a CSV file. You can modify the format of the CSV by overwriting the export_data() method in your module's model which is inherited by base_module_model.
Sign In or Register to comment.