             [view {:style card-action-style}
               [text { } @greeting]]]]])))
 
-(defn valid-form? [props] true)
-
-; TODO: Need to get to local/global props to get the 'validation result'
-
-; (defn valid-form? [props]
-;   (js/console.log "valid form?")
-;   (let [validation-result
-;     (.validate (-> props
-;                                          (aget "refs")
-;                                          (aget "form")))]
-;   (empty? (js->clj (aget validation-result "errors")))))
-
-(defn sanitise-form [incident]
-  (if (valid-form? incident)
+(defn valid-form? [props]
+  (let [validation-result (.validate (-> props
+                                         (aget "refs")
+                                         (aget "form")))]
+  (empty? (js->clj (aget validation-result "errors")))))
+
+(defn on-submit [props incident]
+  (when (valid-form? props)
     (js/console.log (clj->js incident))
     (let [value (keywordize-keys (:value incident))
           start_time (:start_time value)

      (t.struct (clj->js (assoc obj :id t.Number)))
      (t.struct (clj->js obj)))))

; ; TODO: Move state into GLOBAL app state, not confined to component
;
(def style
  {

            (assoc :start_time (.toISOString (new js/Date start_time)))
            (assoc :end_time (.toISOString (new js/Date end_time))))]
            (js/console.log "converted incident object to: " (clj->js updated))
      (rf/dispatch [:save-incident updated])
      (rf/dispatch [:nav/push :incidents]))))

(defn save [incident]
  (let [updated (sanitise-form incident)]
