# vim: sw=3 ts=3 ft=org

#+TITLE: DropDown Element 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]]

* DropDown Element - #dropdown {}

The dropdown element produces an HTML dropdown.

** Usage

#+BEGIN_SRC erlang
   #dropdown { id=dropdown1, value="2", options=[
     #option { text="Option 1", value="1" },
     #option { text="Option 2", value="2" },
     #option { text="Option 3", value="3" }
   ]}
#+END_SRC

** Attributes

   + options - (/list of option elements/) :: Set the available options for this dropdown.

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

   + postback - (/Erlang term/) :: 
			If set, selecting an option will automatically
      initiate a Nitrogen postback with the supplied term.

   + value - (/string/) :: If set, the option matching this value will be selected by default.

   + html\_name - (/string/) :: The name attribute of the dropdownbox

** See Also

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

   + [[./option.html][option element]]

   + [[./button.html][button element]]

   + [[./textbox.html][textbox element]]

   + [[./password.html][password element]]

   + [[./textarea.html][textarea element]]

   + [[./checkbox.html][checkbox element]]

 
