Welcome Guest, Not a member yet? Register   Sign In
set_radio and set_checkbox have problems with value of 0
#17

[eluser]sparky672[/eluser]
As of this posting, using the latest CI (version 2.1.4), and also have this problem.

Already using quotation marks as per a previous comment...

Code:
<input type="radio" name="active" value="1"  <?php echo set_radio('active', '1') ?> />
<input type="radio" name="active" value="0"  <?php echo set_radio('active', '0') ?> />

I'm a little surprised this bug has lingered for so many years.

-----

As a workaround, I have to create an empty rule...

Code:
$this->form_validation->set_rules('active', 'Status', '');

-----

I'm open to any suggestions for a workaround cleaner than an empty validation rule. Thank-you.


Messages In This Thread
set_radio and set_checkbox have problems with value of 0 - by El Forum - 11-13-2013, 02:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB