diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-01-10 19:00:13 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-01-10 19:00:13 +0100 |
commit | 36731bcfd27a965b3f3ee18608478eced5282510 (patch) | |
tree | 51e5e77a5280504a74496565b8b8cbdb6fdabbc5 /system/helpers/form_helper.php | |
parent | 56e5722f2861f0e4c2bd0c9bb4e9d5065dd0a5b0 (diff) |
added support for external urls in form_open
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r-- | system/helpers/form_helper.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 1d2cb8604..7c3bc9d81 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -42,7 +42,9 @@ function form_open($action = '', $attributes = array(), $hidden = array()) {
$CI =& get_instance();
- $form = '<form action="'.$CI->config->site_url($action).'"';
+ $action = ( strpos($action, '://') === FALSE) ? $CI->config->site_url($action) : $action;
+
+ $form = '<form action="'.$action.'"';
if ( ! isset($attributes['method']))
{
@@ -229,7 +231,7 @@ function form_dropdown($name = '', $options = array(), $selected = array(), $ext }
if ($extra != '') $extra = ' '.$extra;
- $multiple = (count($selected) > 1)?' multiple="multiple"':'';
+ $multiple = (count($selected > 1))?' multiple="multiple"':'';
$form = '<select name="'.$name.'"'.$extra.$multiple.">\n";
|