[eluser]Fierymind[/eluser]
First, the form validation of CI 1.7 is GREAT, it really save a lot of time and hours of coding.
I could use From validation when I fill an empty form .. I could make form re-populate the correct form fields if the validation failed .. (really great feature too)
Problem now in Validation and re-population of already filled form, Imagine an EDIT form, the form will get $data from a DB and fill form inputs in the view file the regular way:
Code:
<?php echo form_input('name',$name); ?>
<?php echo form_input('address',$address); ?>
but if you want to use the form validation + the re-population feature, you will need the view file to look like that:
Code:
<?php echo form_input('name',set_value('name')); ?>
<?php echo form_input('address',set_value('address')); ?>
but in that case, form will loaded with EMPTY fields
any idea to how to load filled inputs and implement the re-population feature of the form validation?