diff options
author | Derek Allard <derek.allard@ellislab.com> | 2009-02-10 15:00:34 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2009-02-10 15:00:34 +0100 |
commit | 904094a177488edeacbe8e184d788c286c3e3d9f (patch) | |
tree | c07e2645f598732f33a6817060bf946e6ac7c7fd | |
parent | 54273ce2807ba2d9ecb67f24e2700c22c59fdb53 (diff) |
Changed the default "type" of form_button() to "button" from "submit" in the form helper.
-rw-r--r-- | system/helpers/form_helper.php | 2 | ||||
-rw-r--r-- | user_guide/changelog.html | 3 | ||||
-rw-r--r-- | user_guide/helpers/form_helper.html | 2 | ||||
-rw-r--r-- | user_guide/helpers/html_helper.html | 7 |
4 files changed, 10 insertions, 4 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 8cae91a41..4a62cdb5e 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -424,7 +424,7 @@ if ( ! function_exists('form_button')) { function form_button($data = '', $content = '', $extra = '') { - $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'type' => 'submit'); + $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'type' => 'button'); if ( is_array($data) AND isset($data['content'])) { diff --git a/user_guide/changelog.html b/user_guide/changelog.html index c5a2d667b..c66ff2314 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -85,7 +85,8 @@ SVN Revision: </p> <ul> <li>Added the ability to have optgroups in <kbd>form_dropdown()</kbd> within the <a href="helpers/form_helper.html">form helper</a>.</li> <li>Added a doctype() function to the <a href="helpers/html_helper.html">HTML helper</a>.</li> - <li>Added ability to force lowercase for url_title() in the <a href="helpers/url_helper.html">URL helper</a>.</li> + <li>Added ability to force lowercase for <kbd>url_title()</kbd> in the <a href="helpers/url_helper.html">URL helper</a>.</li> + <li>Changed the default "type" of <kbd>form_button()</kbd> to "button" from "submit" in the <a href="helpers/form_helper.html">form helper</a>.</li> </ul> </li> <li>Other Changes diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html index 8504ac02f..ae3b07e53 100644 --- a/user_guide/helpers/form_helper.html +++ b/user_guide/helpers/form_helper.html @@ -350,7 +350,7 @@ fourth parameter:</p> echo form_button('name','content');<br /> <br /> // Would produce<br /> -<button name="name" type="submit">Content</button> +<button name="name" type="button">Content</button> </code> Or you can pass an associative array containing any data you wish your form to contain: diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index fd92f4dcb..e6a65277a 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -166,6 +166,11 @@ echo ul($list, $attributes);<br /> <code> $this->load->helper('html');<br /> <br /> +$attributes = array(<br /> + 'class' => 'boldlist',<br /> + 'id' => 'mylist'<br /> + );<br /> +<br /> $list = array(<br /> 'colors' => array(<br /> 'red',<br /> @@ -197,7 +202,7 @@ $list = array(<br /> );<br /> <br /> <br /> -echo ul($list);</code> +echo ul($list, $attributes);</code> <p>The above code will produce this:</p> |