Welcome Guest, Not a member yet? Register   Sign In
Do YOU use CodeIgniter's form helpers?
#11

[eluser]CroNiX[/eluser]
[quote author="Calvin Froedge" date="1297920179"]@Jaketoolson set_value is defined in the form_validation class. The form helper only initializes set_value if it doesn't already exist.
[/quote]
That's partially correct. set_value() is defined in the form_helper.php file, which is autoloaded by the validation library in it's constructor. This allow you to use set_value() as a standalone function in views and controllers.

It is also defined in the validation library, however it is a little different code-wise. Also, I have never seen anyone use it, as you would have to call it by $this->form_validation->set_value() from the controller or view, instead of just the helper, set_value().




Theme © iAndrew 2016 - Forum software by © MyBB