I have arrays of radio named "radio[]" with 5 options to choose from. I need to retain the inputed data when validation fails. How do we use old() function with radio buttons?
@grim359 actually you can just use checked with HTML5. You don't need the old style checked="checked". <input type="radio" checked> The same goes for selected in <select> options, <option value="1" selected>value</option>
Hi all - related to this, curious to your thoughts when the values of the radio buttons are 0, 1, 2, 3, etc. By default, this code will assume 0=false and 1=true, and therefore if there are multiple it will assume 0 means nothing instead of the first radio button. My solution was the following - does anyone have a better or more efficient way to do this?