Welcome Guest, Not a member yet? Register   Sign In
Codeigniter form helper VS Html forms
#1

Hello, this is my third day on CodeIgniter course and i was wondering if CodeIgniter's forms are better than html and why?

Both seem to do the exact same thing and both are pretty easy to use but i don't get why should i use PHP in order to render them.
Reply
#2

Using PHP saves you from making typos and also makes it very easy to change the HTML of a certain type of form field all over your site.

Personally I prefer to use FormGenLib (frankmichel.de/formgenlib/user_guide/) to generate most of my forms. It makes for simple, easy to understand clean code, saves me from having to make one view-file for each form and has built in handling of the validation. The fields of the form is instead defined in the controller. Sadly Frank hasn't developed FormGenLib since about the same time as CI development slowed down. But it's open source so it's up to anyone.
Reply
#3

From the performance aspect which is faster?
Reply
#4

fastest >> html > CI helper > FormGenLib >> slowest

But unless you have a large number of simultaneous users there is no difference that neither you or your visitors will notice.
Reply
#5

I'll probably stick with CI's forms because they look better Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB