Liking cljdoc? Tell your friends :D

clj-simple-form.fields

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.
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.
raw docstring

check-boxclj

(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)
Returns a check box element.

### Example

    (check-box :remember-me)
raw docstring

check-box-groupclj

(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.

Example

(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"]])
raw docstring

(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"])
Returns a drop down.

### Example

    (drop-down :language ["Finnish" "English"])
raw docstring

email-fieldclj

(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"})
Returns an email field element.

### Example

    (email-field :email {:value "joe@example.com"})
raw docstring

file-uploadclj

(file-upload field)
(file-upload field {:keys [input-html] :as args :or {input-html {}}})

Returns a file upload element.

Example

(file-upload :avatar)
Returns a file upload element.

### Example

    (file-upload :avatar)
raw docstring

hidden-fieldclj

(hidden-field field)
(hidden-field field {:keys [value] :or {value (value-for field)}})

Returns a hidden field element.

Example

(hidden-field :redirect-url {:value "http://www.example.com/"})
Returns a hidden field element.

### Example

    (hidden-field :redirect-url {:value "http://www.example.com/"})
raw docstring

password-fieldclj

(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)
Returns a password field element.

### Example

    (password-field :password)
raw docstring

radio-button-groupclj

(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.

Example

(radio-button-group :language ["Finnish" "English"]
                    {:value "Finnish"})
Returns a group of radio button elements.

### Example

    (radio-button-group :language ["Finnish" "English"]
                        {:value "Finnish"})
raw docstring

text-areaclj

(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."})
Returns a text area element.

### Example

    (text-area :bio {:value "It was the summer of '69."})
raw docstring

text-fieldclj

(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"}})
Returns a text field element.

### Example

    (text-field :name {:input-html {:class "name"}})
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close