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?

Comments

  • edited 11:07AM
    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:
    https://github.com/daylightstudio/FUEL-CMS/blob/v0.9.3/fuel/application/controllers/contact.php

    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 11:07AM
    Thanks. What about the backend. I need to get all email address from Database.
  • edited 11:07AM
    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.
    http://docs.getfuelcms.com/modules/simple
Sign In or Register to comment.