From 707d0e0f1e0ea922fbe38d8b43f1fb4e2ea001e5 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Tue, 18 Mar 2008 11:50:00 +0000 Subject: added form_button to form helper --- system/helpers/form_helper.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'system/helpers/form_helper.php') diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 7c3b16ff1..db41cb5cd 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -386,6 +386,33 @@ if (! function_exists('form_reset')) // ------------------------------------------------------------------------ +/** + * Form Button + * + * @access public + * @param mixed + * @param string + * @param string + * @return string + */ +if (! function_exists('form_button')) +{ + function form_button($data = '', $content = '', $extra = '') + { + $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'type' => 'submit'); + + if ( is_array($data) AND isset($data['content'])) + { + $content = $data['content']; + unset($data['content']); // content is not an attribute + } + + return "\n"; + } +} + +// ------------------------------------------------------------------------ + /** * Form Label Tag * -- cgit v1.2.3-24-g4f1b