      "I want to get noticed about major updates in my supported district(s)."
      :subscribe-district-alerts)
 
-   (row
-    "comments"
-    [:textarea.form-control
-     {:field :textarea :id :comments}])]
-   [:hr]
-   [:h4 "This is not useful anymore (from reagent-forms example)"]
-   (input "kg" :numeric :weight-kg)
-   (input "lb" :numeric :weight-lb)
-
-   [:hr]
-
-   (row "Best friend"
-        [:div {:field           :typeahead
-               :id              :ta
-               :data-source     friend-source
-               :input-class     "form-control"
-               :list-class      "typeahead-list"
-               :item-class      "typeahead-item"
-               :highlight-class "highlighted"}])
-   [:br]
-
-   (row "isn't data binding lovely?"
-        [:input {:field :checkbox :id :databinding.lovely}])
-   [:label
-    {:field :label
-     :preamble "The level of awesome: "
-     :placeholder "N/A"
-     :id :awesomeness}]
-
-   [:input {:field :range :min 1 :max 10 :id :awesomeness}]])
+    (row
+     "comments"
+     [:textarea.form-control
+      {:field :textarea :id :comments}])]])
 
 
 ;;; PAGE
 
+(defn validate! [doc]
+  (if (empty? (get-in @doc [:person :first-name]))
+    (swap! doc assoc-in [:errors :first-name] "first name is empty")))
+
+(defn submit! [doc]
+  )
+
 (defn page []
-  (let [doc (atom {:person {:first-name "John"
-                            :age 35
-                            :email "foo@bar.baz"}
-                   :weight 100
-                   :height 200
-                   :bmi 0.5
-                   :comments "some interesting comments\non this subject"
-                   :radioselection :b
-                   :position [:left :right]
-                   :pick-one :bar
-                   :unique {:position :middle}
-                   :pick-a-few [:bar :baz]
-                   :many {:options :bar}})]
+  (let [doc (atom {})]
     (fn []
       [:div
        [:div.page-header [:h1 "Sample Form"]]

       [bind-fields
        form-template
        doc
        (fn [[id] value {:keys [weight-lb weight-kg] :as document}]
           (cond
            (= id :weight-lb)
            (assoc document :weight-kg (/ value 2.2046))
            (= id :weight-kg)
            (assoc document :weight-lb (* value 2.2046))
            :else nil))
        (fn [[id] value {:keys [height weight] :as document}]
          (when (and (some #{id} [:height :weight]) weight height)
            (assoc document :bmi (/ weight (* height height)))))]

       [:button.btn.btn-default
         {:on-click
          #(if (empty? (get-in @doc [:person :first-name]))
             (swap! doc assoc-in [:errors :first-name]"first name is empty"))}
         "Submit"]

       [:hr]
       [:h1 "Document State"]
       [edn->hiccup @doc]])))

   #_[signature-component]

   [:div
    (input "first name" :text :person.first-name)
    [:div.row
     [:div.col-md-2]
     [:div.col-md-5
      [:div.alert.alert-danger
       {:field :alert :id :errors.first-name}]]]

    (input "last name" :text :person.last-name)
    [:div.row
     [:div.col-md-2]
     [:div.col-md-5
      [:div.alert.alert-success
       {:field :alert :id :person.last-name :event empty?}
       "last name is empty!"]]]

    [:div.form-group
     [:label "age"]
     [:select.form-control {:field :list :id :person.age}
      (for [a age-groups]
        [:option {:value a :key a} (name a)])]]

    (input "email" :email :person.email)
    [:div.row
     [:div.col-md-2]
     [:div.col-md-5
      [:div.alert.alert-danger
       {:field :alert :id :errors.email :event empty?}
       "email is empty!"]]]

    (radios-yes-no
     "I want to get noticed about my supported ideas progress."
