[eluser]cwt137[/eluser]
When you do form validation, and an error occurs, when the form gets re-populated, the fields without form validation rules do not get re-populated. This bug is very annoying. I found a cheap way around this problem until this problem is fixed. My solution is for the fields that don't require validation, still make a rule for it like so:
Code:
$this->form_validation->set_rules('foo_field','', 'callback__not_required');
Then in the call back function, just return true:
Code:
function _not_required($str) {
return TRUE;
}
This way if some other field does not pass validation, the field that I don't need validated will still get re-populated.