Skip to content
Derek Jones edited this page Jul 5, 2012 · 18 revisions

Category:Contributions::Applications

Name: FormIgniter v0.8.3 Released: October 26 2009 CI Version: Tested with CodeIgniter 1.7.2 Author: Ollie Rattue

A Code Generator for CodeIgniter Forms

The problem

Building validated forms in Code Igniter using the form_validation library takes too long. To build a form with the form validator and form libraries you need to enter the same value in multiple places; 3 times in the view, the label, the fields error message, and the field itself, again in the controller, once more in the model, and finally you need to setup the database schema to accept these values. This is repetitive and dull.

The solution

Build a little application to automate the large majority of this process. You enter the field names, types, labels and validation rules and it generates all the code for a working validated form.

Considerations

Forms tend to have some bespoke element (AJAX, sessions, custom callbacks etc). Often libraries and scripts tend to try and do the whole process and thus force you into a mold. FormIgniter should simply write 4 files; the MVC and the db schema and then get out of the way.

Where can I find this?

Live application - http://formigniter.org/app

Further explanation and source code - http://formigniter.org

CodeIgniter forum discussion - http://codeigniter.com/forums/viewthread/111570/

Clone this wiki locally