[eluser]andrejmk[/eluser]
I have this code in my view:
Code:
<input type="checkbox" name="test[]" value="1" <?php echo set_checkbox("test[]", "1")
?>>test1
<input type="checkbox" name="test[]" value="2" <?php echo set_checkbox("test[]", "2") ?>>test2
This checkboxes are not required, but some other fields on the form are. I want to keep the values of this checkboxes when I post the form. The values from the checkboxes are in the POST, but the values are not kept when the form loads again after the post (if some of them is checked before the post, I want it to be checked after the post). I also tried set_checkbox("test", "1"), but it didn't work.