(clear-problems container-or-form-el)
Clears form problems from the DOM
Clears form problems from the DOM
(get-form-el container-or-form-el)
Given a form container element or a form element, returns the form element
Given a form container element or a form element, returns the form element
(get-offset-top el)
Returns an element's top offset relative to the window
Returns an element's top offset relative to the window
(get-scroll-top)
Returns the top window scroll position
Returns the top window scroll position
(handle-submit form-spec container-or-form-el success & [failure])
Attaches an event handler to a form's "submit" browser event, validates submitted data, then:
Attaches an event handler to a form's "submit" browser event, validates submitted data, then: * If validation fails, shows the problems (or, if provided, calls a custom failure function with the problems data as the argument) * If validation succeeds, calls a success function with parsed params as the argument
(scroll-to-el el)
Scrolls the window to an element's offset top
Scrolls the window to an element's offset top
(serialize form-el)
Returns a form data string for the given form element, suitable for Ajax GET/POST, or passing to formative.parse/parse-params.
Returns a form data string for the given form element, suitable for Ajax GET/POST, or passing to formative.parse/parse-params.
(show-problems form-spec container-or-form-el problems)
Shows form problems in the DOM
Shows form problems in the DOM
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close