Liking cljdoc? Tell your friends :D
ClojureScript only.

tree-form.components


formcljs

(form {:keys [includes] :as form-props})

Basic usage:

[form {:id :my-super-form :validate my-validate-fn :on-submit my-submit-fn :init my-init-fn :clean-up my-clean-up-fn :clear-state false :fields {:my-something nil :my-name {:default "Albert"} :my-age {:default 10 :validate validate-field-fn :validate-on-action true :process (comp js/parseInt #($ % :target.value))}} :includes {:my-custon-prop-name [:path :to :prop :in :db]}}

(fn [{:keys [fields errors includes on-submit]}] [:form {:on-submit on-submit} [:input {:on-change (-> fields :my-name :action) :value (-> fields :my-name :value)}]])]

Basic usage:

[form {:id          :my-super-form
       :validate    my-validate-fn
       :on-submit   my-submit-fn
       :init        my-init-fn
       :clean-up    my-clean-up-fn
       :clear-state false
       :fields      {:my-something nil
                     :my-name      {:default "Albert"}
                     :my-age       {:default 10
                                    :validate validate-field-fn
                                    :validate-on-action true
                                    :process (comp js/parseInt #($ % :target.value))}}
       :includes    {:my-custon-prop-name [:path :to :prop :in :db]}}

  (fn [{:keys [fields errors includes on-submit]}]
    [:form {:on-submit on-submit}
     [:input {:on-change (-> fields :my-name :action)
              :value (-> fields :my-name :value)}]])]
raw docstring

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

× close