From 82654c38441540e14096ec0fd95623af14d165ee Mon Sep 17 00:00:00 2001
From: admin
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:
+ +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>
+
+
+
+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); ?> />
+
+
+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