Welcome Guest, Not a member yet? Register   Sign In
set_checkbox() problem
#1

[eluser]DominixZ[/eluser]
Hi,everyone

I just use set_checkbox() to manipulate data but I have found some bug that if i don't validate those checkboxes.

Code:
<input type="checkbox" name="registration_list_allow" value="yes"
                    <?=set_checkbox('registration_list_allow',set_value('registration_list_allow',$registration_list_allow),($registration_list_allow == "yes")?TRUE:FALSE)?> />

This code run fine but if i don't use

Code:
$this->form_validation->set_rules('registration_list_allow','List allow','');

set_checkbox() will always uncheck when validate is false.

Can you guide me how to use set_checkbox() for practical to use in add and edit form ?

P.S I use set_value because i use this form for add and edit.


Messages In This Thread
set_checkbox() problem - by El Forum - 07-04-2009, 10:17 AM
set_checkbox() problem - by El Forum - 07-04-2009, 11:15 AM
set_checkbox() problem - by El Forum - 07-04-2009, 12:26 PM
set_checkbox() problem - by El Forum - 07-04-2009, 12:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB