RadioButton

Defines a radio button


Provides a wrapper for Phoenix.HTML.Form's radio_button/4 function.

All options passed via opts will be sent to radio_button/4 , value and class can be set directly and will override anything in opts .



<Field name="answer">
  <div class="control">
    <label class="radio">
      <RadioButton value="yes" checked /> Yes
    </label>
    <label class="radio">
      <RadioButton value="no" /> No
    </label>
  </div>
</Field>

# Public API

Name Description Type Values Default
opts Options list.

:keyword []
class Class or classes to apply to the input.

:css_class
value Value to pre-populated the input.

:string
field An identifier for the input.

:string
form An identifier for the form.

:form
checked Indicates whether or not the radio button is the selected item in the group.

:boolean