Welcome Guest, Not a member yet? Register   Sign In
Form Validation and repopulating the form (set_value)
#2

[eluser]jrtashjian[/eluser]
Hey, I have run into this same exact problem quite often.

What I have done to re-populate fields that are not required is to just set a rule on the field and leave the rule as an empty string. Like so:

Code:
$this->form_validation->set_rules('form_element', 'Form name', '');

instead of this:

Code:
$this->form_validation->set_rules('form_element', 'Form name', 'required');

If you leave the rule blank, the field does not get validated but will be re-populated when you use set_value('form_element')

Hope that helps! I know this is a late response Smile


Messages In This Thread
Form Validation and repopulating the form (set_value) - by El Forum - 01-11-2009, 06:35 PM
Form Validation and repopulating the form (set_value) - by El Forum - 02-19-2009, 10:08 AM
Form Validation and repopulating the form (set_value) - by El Forum - 02-19-2009, 10:18 AM
Form Validation and repopulating the form (set_value) - by El Forum - 02-19-2009, 10:26 AM
Form Validation and repopulating the form (set_value) - by El Forum - 02-19-2009, 10:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB