Skip to content

Instantly share code, notes, and snippets.

@joncode
Created April 26, 2012 06:01
Show Gist options
  • Save joncode/2496424 to your computer and use it in GitHub Desktop.
Save joncode/2496424 to your computer and use it in GitHub Desktop.
radio button won't checked=checked
the problem was solved by nesting the
<input name="option.<%= feature.name %>" type="radio" checked="checked" value="<%= option_value %>">
in a form.
<form>
<input name="option.<%= feature.name %>" type="radio" checked="checked" value="<%= option_value %>">
</form>
Altho in one controller it works NOT in a form and also the checkboxes were checked=checked without the form.
For some reason making it a form allowed for the checked=checked to work.
The other features of the radio buttons worked fine, just not checked=checked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment