From 904094a177488edeacbe8e184d788c286c3e3d9f Mon Sep 17 00:00:00 2001
From: Derek Allard
Date: Tue, 10 Feb 2009 14:00:34 +0000
Subject: Changed the default "type" of form_button() to "button" from "submit"
in the form helper.
---
user_guide/changelog.html | 3 ++-
user_guide/helpers/form_helper.html | 2 +-
user_guide/helpers/html_helper.html | 7 ++++++-
3 files changed, 9 insertions(+), 3 deletions(-)
(limited to 'user_guide')
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:
- Added the ability to have optgroups in form_dropdown() within the form helper.
- Added a doctype() function to the HTML helper.
- - Added ability to force lowercase for url_title() in the URL helper.
+ - Added ability to force lowercase for url_title() in the URL helper.
+ - Changed the default "type" of form_button() to "button" from "submit" in the form helper.
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:
echo form_button('name','content');
// Would produce
-<button name="name" type="submit">Content</button>
+<button name="name" type="button">Content</button>
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);
$this->load->helper('html');
+$attributes = array(
+ 'class' => 'boldlist',
+ 'id' => 'mylist'
+ );
+
$list = array(
'colors' => array(
'red',
@@ -197,7 +202,7 @@ $list = array(
);
-echo ul($list);
+echo ul($list, $attributes);
The above code will produce this:
--
cgit v1.2.3-24-g4f1b