FormUtil is an open source CodeIgniter library, in which you can easily generate, validate and (re)populate a form. All you do is initialize the form with the input items (including labels, validation rules etc.) in the controller, add a single line of code in the view and FormUtil will do all the work for you!
Click here for more info, examples and documentation.
- All form initialization/validation in one place
- Automatic validation when form is submitted
- Automatic repopulation of the form if validation was unsuccessfull
- Supports multiple forms on one page
- Supports multiple templates and template switching is easy
Installation is very simple:
- Copy /libraries/Formutil.php and /config/formutil.php to the corresponding directories in you CI projects.
- If you want, copy /views/example.php and /controllers/example.php to the corresponding directories. Be aware that the example uses Twitter Bootstrap for basic layout.