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

As I mentioned previously the code for form_radio() just passes the arguments to form_checkbox, so you basically treat it the same as a checkbox. However, you won't have an array of values for a set of radio buttons, because only one in a group will be selected. So, instead of using
Code:
in_array($value, $selectedValues)
you would just use
Code:
$value === $selectedValue
for either the 'checked' attribute or the third parameter passed to form_radio().
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB