[eluser]JanDoToDo[/eluser]
hey guys
Im having a problem with form validation. The validation is failing even thooough the only condition set is true.
Code:
$this -> form_validation -> set_rules('gender', 'Gender', 'required');
is the only rule that im setting however it always fails the validation, regardless of the gender i specifiy. its almost as if the validation is validating all elements even thgouh i dont want it to.
here is my form. Interestingly if i deselect the display photo checkbox (it is checked by default) the form always returns false even thgouh there are no validation errors as no validation is set on it.
Code:
<td>I'm</td>
<td>Male<?php echo form_radio($male); ?> Female <?php echo form_radio($female); ?> <td>
</tr>
<tr>
<td>...who is</td>
<td><?php echo form_dropdown('age_range', $age_range); ?></td>
</tr>
<tr>
<td>..and if is from</td>
<td><?php echo form_dropdown('location', $loc); ?> (or near to)</td>
</tr>
<tr>
<td>Only display if they </td>
<td>have a photo <?php echo form_checkbox($photo); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo form_submit('submit', 'Search'); ?></td>
</tr>
could someone help me out?
its very urgent!