[eluser]Unknown[/eluser]
Hello. I am new to CI, and am finding that I like it very much. At the moment, I am just getting a feel for how all of it works. However, I have run into a problem that I was wondering someone could assist me with.
Here's the scenario:
I query the DB for a record, set the values in an array, and then render the view with this array. Upon form submission, I run a form validation on it. If form validation fails, I re-render the view.
In the view, I am using the form helper's function set_value to repopulate the form in the event the form fails validation. The problem is if I have a field that I don't need to validate (an optional free-form field for example), the value the user entered when they submitted the form does not repopulate in the event of a form validation error.
It appears the set_value function in the form helper class first checks to see if the form validation library is loaded. If it is, it dispatches control to that class to get the value of the field. But if that field didn't have any validation set on it, the form validation class knows nothing of it.
It seems the form helper should also be checking if the form validation library contains the field in question, and if it doesn't, it should use the $_POST array.
Any ideas?
Thanks!