Functions for creating pre-populated form fields.
:input-html: HTML attributes for the input element. Defaults to {}.:value: Value for the field. Defaults to value for field in current scope.Functions for creating pre-populated form fields.
### Options for fields
* `:input-html`: HTML attributes for the input element. Defaults to `{}`.
* `:value`: Value for the field. Defaults to value for field in current scope.(check-box field)(check-box field
{:keys [input-html value]
:as args
:or {input-html {} value (value-for field)}})Returns a check box element.
### Example
(check-box :remember-me)(check-box-group field options)(check-box-group field
options
{:keys [value] :as args :or {value (value-for field)}})Returns a group of checkbox elements.
(check-box-group :hobbies [["webdev" "Web Development"]
["spelunking" "Spelunking"]])
Returns a group of checkbox elements.
### Example
(check-box-group :hobbies [["webdev" "Web Development"]
["spelunking" "Spelunking"]])(drop-down field options)(drop-down field
options
{:keys [input-html value]
:as args
:or {input-html {} value (value-for field)}})Returns a drop down.
### Example
(drop-down :language ["Finnish" "English"])(email-field field)(email-field field
{:keys [input-html value]
:as args
:or {input-html {} value (value-for field)}})Returns an email field element.
### Example
(email-field :email {:value "joe@example.com"})(file-upload field)(file-upload field {:keys [input-html] :as args :or {input-html {}}})Returns a file upload element.
### Example
(file-upload :avatar)(hidden-field field)(hidden-field field {:keys [value] :or {value (value-for field)}})Returns a hidden field element.
(hidden-field :redirect-url {:value "http://www.example.com/"})
Returns a hidden field element.
### Example
(hidden-field :redirect-url {:value "http://www.example.com/"})(password-field field)(password-field field
{:keys [input-html value]
:as args
:or {input-html {} value (value-for field)}})Returns a password field element.
### Example
(password-field :password)(radio-button-group field options)(radio-button-group field
options
{:keys [value] :as args :or {value (value-for field)}})Returns a group of radio button elements.
(radio-button-group :language ["Finnish" "English"]
{:value "Finnish"})
Returns a group of radio button elements.
### Example
(radio-button-group :language ["Finnish" "English"]
{:value "Finnish"})(text-area field)(text-area field
{:keys [input-html value]
:as args
:or {input-html {} value (value-for field)}})Returns a text area element.
### Example
(text-area :bio {:value "It was the summer of '69."})(text-field field)(text-field field
{:keys [input-html value]
:or {input-html {} value (value-for field)}})Returns a text field element.
### Example
(text-field :name {:input-html {:class "name"}})cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |