# vim: ts=3 sw=3 et ft=org
#+TITLE: Radio Element
#+STYLE: <LINK href='../stylesheet.css' rel='stylesheet' type='text/css' />
#+AUTHOR: Rusty Klophaus (@rustyio)
#+OPTIONS:   H:2 num:1 toc:1 \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+EMAIL: 
#+TEXT: [[file:../index.org][Getting Started]] | [[file:../api.org][API]] | [[file:../elements.org][*Elements*]] | [[file:../actions.org][Actions]] | [[file:../validators.org][Validators]] | [[file:../handlers.org][Handlers]] | [[file:../config.org][Configuration Options]] | [[file:../about.org][About]]

* Radio Element - #radio {}

  The radio element produces an HTML radio button.

** Usage

#+BEGIN_SRC erlang
   [
      #radio { name=fruit, text="Apple", checked=true },
      #radio { name=fruit, text="Orange" },
      #radio { name=fruit, text="Banana", value="banana" }
   ].
#+END_SRC

** Attributes

   + text - (/string/) :: The radio button's label.

   + html\_encode - (/boolean/) :: Set to true to safely html-encode the text label.

   + value - (/string/) :: The value to be submitted for this radio button in postbacks if it is selected.

   + postback - (/Erlang term/) :: If set, clicking on the checkbox will initiate a Nitrogen postback with the supplied term.

   + checked - (/boolean/) :: True if the radio button should be checked.

   + name - (/string/) :: The name attribute of the checkbox. If this is not contained within a =#radiogroup{}= element, then =name= must be specified, as =name= determines the "group" of the radio buttons (that is, when one member of a radio group is selected, the others are unselected).

   + html\_name - (/string/) :: The name attribute of the checkbox. ( This does essentially the same thing as the =name= attribute, but is semantically different for use with the RESTful elements, as all RESTful elements shre the =html_name= attributes. If you're not sure, just use =name=)

** See Also

   + [[./base.html][base]]

   + [[./radiogroup.html][radiogroup]]

   + [[./button.html][Button]]

   + [[./link.html][Link]]

   + [[./textbox.html][Textbox]]

   + [[./password.html][Password]]

   + [[./textarea.html][Textarea]]

   + [[./dropdown.html][Dropdown]]

   + [[./option.html][Dropdown Option]]

   + [[../restful_overfiew.html][RESTful element overview]]

