[eluser]überfuzz[/eluser]
I have a question about the form_validation class.
In the following example theres two fields. One with some rules attached to it and one field with no rules.
Code:
$this->form_validation->set_rules('name', 'Name', 'required|min_length[2]|max_length[40]');
$this->form_validation->set_rules('example'); //tried to delete
And in the form I'm setting values like this:
Code:
<?php echo form_input('name', set_value('name')); ?>
<?php echo form_input('example', set_value('example')); ?> // if set_rules->example deleted value="[empty]"
However, I deleted the line with example because there where no rules, no need setting it then was the idea. But if I delete it the value isn't stored , value="[empty]", if the user fires the form submit. Is there an other way of passing the input in a field with no rules inserted by the user? Or should I always have rules to every field like; min_lenght, max_length etc?