From 82654c38441540e14096ec0fd95623af14d165ee Mon Sep 17 00:00:00 2001
From: admin
Date: Fri, 20 Oct 2006 23:07:40 +0000
Subject:
---
user_guide/changelog.html | 1 +
user_guide/libraries/validation.html | 39 ++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 2771a14e9..01acd0f41 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -90,6 +90,7 @@ a suggestion offered by coolfactor in our forums. Please check the documentatio
Moved most of the functions in the Controller class into the Loader class, allowing fewer reserved function names for controllers when running under PHP 5.
Updated the DB Result class to return an empty array when $query->result() doesn't produce a result.
Updated the input->cookie() and input->post() functions in Input Class to permit arrays contained cookies that are arrays to be run through the XSS filter.
+Documented three functions from the Validation class that were missing from the user guide: set_select(), set_radio(), and set_checkbox().
Fixed a bug in the Email class related to SMTP Helo data.
Fixed a bug in the validation class.
Fixed a bug in the typography helper that was incorrectly wrapping block level elements in paragraph tags.
diff --git a/user_guide/libraries/validation.html b/user_guide/libraries/validation.html
index 3a724831f..1af3c32fa 100644
--- a/user_guide/libraries/validation.html
+++ b/user_guide/libraries/validation.html
@@ -664,6 +664,45 @@ like trim, htmlspecialchars, urldecode, etc.
Where rule corresponds to the name of a particular rule, and Error Message is the text you would like displayed.
+Dealing with Select Menus, Radio Buttons, and Checkboxes
+
+If you use select menues, radio buttons or checkboxes, you will want the state of
+these items to be retained in the event of an error. The Validation class has three functions taht help you do this:
+
+set_select()
+
+Permits you to display the menu item that was selected. The first parameter
+must contain the name of the select menu, the second parameter must contain the value of
+each item. Example:
+
+
+<select name="myselect">
+<option value="one" <?= $this->validation->set_select('myselect', 'one'); ?> >One</option>
+<option value="two" <?= $this->validation->set_select('myselect', 'two'); ?> >Three</option>
+<option value="three" <?= $this->validation->set_select('myselect', 'three'); ?> >Three</option>
+</select>
+
+
+
+set_checkbox()
+
+Permits you to display a checkbox in the state it was submitted. The first parameter
+must contain the name of the checkbox, the second parameter must contain its value. Example:
+
+<input type="checkbox" name="mycheck" value="1" <?= $this->validation->set_checkbox('mycheck', 1); ?> />
+
+
+set_radio()
+
+Permits you to display radio buttons in the state they were submitted. The first parameter
+must contain the name of the radio button, the second parameter must contain its value. Example:
+
+<input type="radio" name="myradio" value="1" <?= $this->validation->set_radio('myradio', 1); ?> />
+
+
+
+
+
--
cgit v1.2.3-24-g4f1b