      :on-change #(swap! idea-doc assoc-in [:category]
                         (-> % .-target .-value))}
     [:option
-     {:value "" :disabled true :selected true}
+     {:value "", :disabled true, :selected true}
      "Pick a category..."]
     (for [c @db/categories]
       [:option {:value c :key (symbol c)} c])]])

    idea-doc
    #_ (fn [k v _] (prn k v _))]
   [:button.btn.btn-default
    {:on-click #(-> @idea-doc normalize-idea submit-idea!)}
    "Add your idea"]])

(defn signature-component []
  [:div.well
   (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-danger
      {:field :alert :id :errors.last-name}]]]

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

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

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


(defn submit-idea!
  [doc]
  (db/create-idea! doc))

;; forms
