Fixed a bug that was not setting the default checkbox/radio/pull-down value correctly
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 4a62cdb..05616f7 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -644,7 +644,7 @@
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0)
+ if (count($_POST) === 0 AND $default == TRUE)
{
return ' selected="selected"';
}
@@ -699,7 +699,7 @@
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0)
+ if (count($_POST) === 0 AND $default == TRUE)
{
return ' checked="checked"';
}
@@ -754,7 +754,7 @@
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0)
+ if (count($_POST) === 0 AND $default == TRUE)
{
return ' checked="checked"';
}