CodeIgniter Forums

Full Version: when to use form helper?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]searain[/eluser]
Use form helper or not, I am not so sure about that.

CodeIgniter is already very light weight, so what they have in its core set up, when I have the debate that use it or not, I think more times turned out that I should use it.. So such as form helper etc. my guess is that if we debate use it or not, we should use it.

But my question is php is html embed language.

For a complex form, should we just use html to create the form and embed the php, it is more straight forward and easier than use form helper of CI?

El Forum

[eluser]Thorpe Obazee[/eluser]
The form helper I always use is the form_open() function. I use the other form helpers just for the heck of using them.

El Forum

[eluser]Dam1an[/eluser]
I used to always use the form_open function, but I not just post them back to the same function, so don't even need that. I've never yet needed to use any of the others either... It's just a matter of personal preference

El Forum

[eluser]xwero[/eluser]
If you load the validation library the form helper is loaded too. I think it was not a good decision because now the form helper file has functions that have validation logic and functions that don't.

I never use the form element generating functions and for the submit aware functions i rather use functions that access the data global directly instead of accessing a variable in the validation class that stores the global's values too.