• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.

#2
[eluser]TheFuzzy0ne[/eluser]
This has pretty much been dealt with [url="http://ellislab.com/forums/viewthread/121725/"]here[/url]. Please let me know if it doesn't.

#3
[eluser]DominixZ[/eluser]
Thank you. So it is bug , right?

#4
[eluser]TheFuzzy0ne[/eluser]
I believe so, yes.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.