Welcome Guest, Not a member yet? Register   Sign In
Form Validation with Array
#2

[eluser]gigas10[/eluser]
I have noticed this problem as well, but I have developed a work around.
At the top of my page I fill up my array:
Code:
$pull_vals = array();
if(set_value('pull_reason')):
    foreach(set_value('pull_reason') AS $row):
        $pull_vals[] = $row;
    endforeach;
endif;

Then to repopulate, I pass in the filled up array of values as a parameter of form_dropdown.

Code:
<tr class="even">
    <th>Pull Reason: </th>
    <td>&lt;?=form_dropdown('pull_reason[]', $pull_reason_dd, $pull_vals, $multiple);?&gt;</td>
</tr>

An official fix for this would be nice.


Messages In This Thread
Form Validation with Array - by El Forum - 12-09-2010, 10:58 PM
Form Validation with Array - by El Forum - 12-10-2010, 02:38 PM
Form Validation with Array - by El Forum - 12-10-2010, 10:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB