-
-
Notifications
You must be signed in to change notification settings - Fork 72
RadioButtonTag
Antonio Pagano edited this page Mar 14, 2018
·
1 revision
Tags provides a convenient way to build an HTML element with type="radio"
:
<%= f.RadioButtonTag({name: "MyDrink"}) %>
That produces:
<label>
<input class=" form-control" name="MyDrink" type="radio" checked />
</label>
You can easily change the label content with
<%= f.RadioButtonTag({name: "MyDrink", label: " Water"}) %>
That produces:
<label>
<input class=" form-control" name="MyDrink" type="radio" checked /> Water
</label>