Welcome Guest, Not a member yet? Register   Sign In
How to Keep maintain Radio button and chekbox Values After submit in form
#2

On your call to form_dropdown(), you're passing "-1" to the $selected parameter. If you pass the selected value (or an array of selected values if it supports multiple selections), it will select that value. If you don't pass a value to this parameter (or pass an empty array), it will attempt to automatically detect the selected value.

For each of your form_checkbox() calls, you should pass a third parameter, which should be set to true when that checkbox is checked, and false when it is not.

For radio buttons, form_radio() just sets the type to 'radio', then passes the parameters through to form_checkbox(), so they should be treated similarly to the checkboxes.
Reply


Messages In This Thread
RE: How to Keep maintain Radio button and chekbox Values After submit in form - by mwhitney - 05-06-2015, 08:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB