summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2009-03-09 23:36:48 +0100
committerRick Ellis <rick.ellis@ellislab.com>2009-03-09 23:36:48 +0100
commit28e5c8fc0ed79017a67b896613698e98fa7da8b3 (patch)
tree9036ae421a3af2c09e10c558889458dd0fd9f586 /system/helpers/form_helper.php
parentfaac15e56fd45a18049f83d4282436c3d86f6939 (diff)
Fixed a bug that was not setting the default checkbox/radio/pull-down value correctly
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r--system/helpers/form_helper.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 4a62cdb5e..05616f707 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -644,7 +644,7 @@ if ( ! function_exists('set_select'))
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0)
+ if (count($_POST) === 0 AND $default == TRUE)
{
return ' selected="selected"';
}
@@ -699,7 +699,7 @@ if ( ! function_exists('set_checkbox'))
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0)
+ if (count($_POST) === 0 AND $default == TRUE)
{
return ' checked="checked"';
}
@@ -754,7 +754,7 @@ if ( ! function_exists('set_radio'))
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0)
+ if (count($_POST) === 0 AND $default == TRUE)
{
return ' checked="checked"';
}