diff options
-rw-r--r-- | system/helpers/form_helper.php | 2 | ||||
-rw-r--r-- | user_guide_src/source/helpers/form_helper.rst | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 70c40a9c3..53ee8eb11 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -686,7 +686,7 @@ if ( ! function_exists('set_value')) $value = (isset($CI->form_validation) && is_object($CI->form_validation) && $CI->form_validation->has_rule($field)) ? $CI->form_validation->set_value($field, $default) : $CI->input->post($field, FALSE); - + isset($value) OR $value = $default; return ($html_escape) ? html_escape($value) : $value; } diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 362c9c35d..4706ee706 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -591,7 +591,7 @@ The following functions are available: The above form will show "0" when loaded for the first time. - + .. php:function:: set_select($field[, $value = ''[, $default = FALSE]]) :param string $field: Field name |