summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-03-12 15:21:52 +0100
committerMike Funk <mfunk@xulonpress.com>2012-03-12 15:21:52 +0100
commit21e7a3b315335a622b73710f0effa09dc0f85bb6 (patch)
tree248d2cc2f6d2414dcbd9e6b9523f1409409b61fa /system/helpers/form_helper.php
parent5fbaf27ac9da632b520457e91d9088e9aab6df89 (diff)
parent6b4deae9143c4419654e4321fe49330eca493acf (diff)
merged latest develop branch.
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r--system/helpers/form_helper.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 6efef2324..37337d975 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -314,6 +314,28 @@ if ( ! function_exists('form_dropdown'))
{
function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
{
+ // If name is really an array then we'll call the function again using the array
+ if (is_array($name) && isset($name['name']))
+ {
+
+ if ( ! isset($name['options']))
+ {
+ $name['options'] = array();
+ }
+
+ if ( ! isset($name['selected']))
+ {
+ $name['selected'] = array();
+ }
+
+ if ( ! isset($name['extra']))
+ {
+ $name['extra'] = '';
+ }
+
+ return form_dropdown($name['name'], $name['options'], $name['selected'], $name['extra']);
+ }
+
if ( ! is_array($selected))
{
$selected = array($selected);