Repopulate checkboxes |
[eluser]kamikaz[/eluser]
Hi, I have a problem to repopulate checkboxes. I have thing like that: Code: <input type="checkbox" name="roles[]" value="1" id="admin" /> How to get value for each inputs ? I mean if the second one is checked, the array begin at 0 when I want to check which one is checked. I tried to use the "set_checkbox()" like shown in the user guide but it did nothing: Code: <input type="checkbox" name="roles[]" value="1" id="admin" ( [] ) because I tried both Didn't find on the internet what I was looking for Thank you for your help
[eluser]InsiteFX[/eluser]
Just a note here you need to have a form set_rules for the checkbox. Code: <input type="checkbox" name="roles[]" value="1" id="admin" <?php echo set_checkbox( 'roles []', '1' ); ?> />
[eluser]Unknown[/eluser]
[quote author="InsiteFX" date="1378239712"]Just a note here you need to have a form set_rules for the checkbox. Code: <input type="checkbox" name="roles[]" value="1" id="admin" <?php echo set_checkbox( 'roles []', '1' ); ?> /> Yes, you sloved the problem nâng ngực nội soi
|
Welcome Guest, Not a member yet? Register Sign In |