          [:a.btn.btn-xs.btn-default {:disabled true} (str "Add idea to " d)]
          [:br]]))]))
 
-(defn add-idea-form []
-  [:div
-   (input "Idea title" :text :idea.idea)
+(def idea-template
+  [:div
+   (input "Idea title" :text :title)
    [select-cat-component]
    [:p
     [:textarea.form-control
-     {:rows "4" :placeholder "If necessary, add a description"}]]
+     {:rows        "4"
+      :placeholder "If necessary, add a description"
+      :field       :textarea
+      :id          :desc}]]
    (for [i (range 3)]
      [:div {:key i}
-      (input-placeholder "Add a reference URL" :text (symbol (str "idea.url." i)))])])
+      (input "URL" :text (str ":urls." i))])])
 
 (defn add-idea-component []
   [:div
+   [bind-fields
+    idea-template
+    idea-doc
+    #_ (fn [k v _] (prn k v _))]
    [:button.btn.btn-default
-    {:on-click #(db/create-idea! {:title     "More pizza"
-                                  :desc      "Food for me"
-                                  :districts ["Brooklyn"]
-                                  :category  "Green"
-                                  :links     []})}
+    {:on-click #(-> @idea-doc normalize-idea submit-idea!)}
     "Add your idea"]])
 
 (defn signature-component []

  "Ensure the signing user exists and their support is noted."
  [doc]
  (db/create-user! (:person doc) @db/supported-ideas))

;;; view helpers




;;; PAGE

(defn page []
  (fn []
