From 28e5c8fc0ed79017a67b896613698e98fa7da8b3 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Mon, 9 Mar 2009 22:36:48 +0000 Subject: Fixed a bug that was not setting the default checkbox/radio/pull-down value correctly --- system/helpers/form_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/helpers') 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"'; } -- cgit v1.2.3-24-g4f1b