Changed the default "type" of form_button() to "button" from "submit" in the form helper.
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 8cae91a..4a62cdb 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -424,7 +424,7 @@
{
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 c5a2d66..c66ff23 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -85,7 +85,8 @@
<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 8504ac0..ae3b07e 100644
--- a/user_guide/helpers/form_helper.html
+++ b/user_guide/helpers/form_helper.html
@@ -350,7 +350,7 @@
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 fd92f4d..e6a6527 100644
--- a/user_guide/helpers/html_helper.html
+++ b/user_guide/helpers/html_helper.html
@@ -166,6 +166,11 @@
<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 @@
);<br />
<br />
<br />
-echo ul($list);</code>
+echo ul($list, $attributes);</code>
<p>The above code will produce this:</p>