Liking cljdoc? Tell your friends :D

clj-simple-form.form-scope

Functions for managing scope for field errors and values.

Functions for managing scope for field errors and values.
raw docstring

*error-ns*clj


*form-errors*clj


*form-values*clj


error-forclj

(error-for field)

Returns first error message, if any, for field in the current form scope.

Example

(error-for :email)
Returns first error message, if any, for `field` in the current form scope.

### Example

    (error-for :email)
raw docstring

value-forclj

(value-for field)

Returns value for field in the current form scope.

Example

(value-for :email)
Returns value for `field` in the current form scope.

### Example

    (value-for :email)
raw docstring

with-form-scopecljmacro

(with-form-scope object values errors & content)

Sets up bindings for form values, errors, translations, and field names.

Example

(with-form-scope :profile {:email "joe@example.com"} {}
  (email-field-input :email))
Sets up bindings for form values, errors, translations, and field names.

### Example

    (with-form-scope :profile {:email "joe@example.com"} {}
      (email-field-input :email))
raw docstring

with-nested-form-scopecljmacro

(with-nested-form-scope object & content)

Sets up bindings for form values, errors, translations, and field names.

Example

(with-form-scope :profile {} {:address {:street "is required"}}
  (with-nested-form-scope :address
    (text-field-input :street)))
Sets up bindings for form values, errors, translations, and field names.

### Example

    (with-form-scope :profile {} {:address {:street "is required"}}
      (with-nested-form-scope :address
        (text-field-input :street)))
raw docstring

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

× close