Posts Tagged ‘form’

Build a form in CodeIgniter 2.0

Posted in Articles on March 4th, 2011 by admin – Be the first to comment

There are many ways to build a form in CodeIgniter 2.0. Form Helper documentation is a good starting point to learn more about forms in CodeIgniter, however sometimes it worth to avoid using the helpers if that helps designers to understand your code. Also, form validation in CodeIgniter documentation would be useful to learn more about validations.

Simple form CodeIgniter is an article that we posted time ago. In CodeIgniter 2.0 there are some slightly changes. For references, there are many open source applications in CodeIgniter and blog’s posts with examples how to use the forms and validations in CodeIgniter 2.0.

We can find lot of CRUD examples in CodeIgniter 2.0 and form examples. Some of these CRUD samples will create separated functions for edit and save, others will share the logic in the same edit function, and using a create or update approach. In the example provided by Henri, he used this approach to Add or Update a person. Simple CRUD

Related searches:

  • codeigniter 2 crud tutorial
  • codeigniter crud tutorial
  • codeigniter crud validation
  • tutorial CRUD codeigniter 2 0
  • codeigniter edit form
  • timeago in codeigniter
  • crud example in codeigniter
  • CRUD sample codeigniter
  • crud codeigniter samples
  • crud tutorial codeigniter 2 0

Simple Form Generation in CodeIgniter

Posted in Tutorials on August 2nd, 2009 by admin – 12 Comments

If you are using CodeIgniter, as well as any other PHP framework, you may notice that building CRUD forms is one of the most bother and routine tasks. Probably 80% of general web applications uses CRUD (create/read/update/delete).

In CodeIgniter, you can use any of the form generation libraries.

One of my preferred libraries is Form Generation Library by Frank Michel (see @macigniter’s thread here). It allows you to create clean XHTML forms with CodeIgniter. See demo here.

Using Form Generation Library

So, in order to use this library, you need to download it from here (library files only is enough if you don’t want the entire site structure).

read more »

Related searches:

  • codeigniter crud generator
  • codeigniter form library
  • codeigniter form
  • codeigniter 2 crud
  • crud codeigniter 2 0
  • codeigniter form generation library
  • CRUD codeigniter 2
  • codeigniter form generation
  • crud codeigniter download
  • CODEIGNITER CRUD

How to submit a page to the same controller in CodeIgniter

Posted in Snippets Ideas on July 17th, 2009 by admin – 2 Comments

Imagine you have a view with a <FORM> that need to submit to the same controller class. Probably you don’t want to hardcode the action attribute of your form nor leaving it in blank.

Using PHP_SELF could be a possible approach. However, since $_SERVER[‘PHP_SELF’] is a PHP server variable (nothing to do with CodeIgniter), you may encounter some problems with different environments.

So, why not to use the built-in CodeIgniter URI library? My solution to this problem is the following. Use $this->uri->uri_string() in conjunction with site_url().

Here is a simple example:



Related searches:

  • codeigniter submit
  • codeigniter submit controller view
  • codeigniter $server[\php_self\]
  • submit codeigniter
  • how to resubmit the page to the same controller
  • controller in same page codeigniter
  • codeigniter submit to same page
  • codeigniter submit to different controller
  • codeigniter form helper submit to same page
  • codeigniter $_server[php_self