      :created-at (ds/created-at question-group)
      :modified-at (ds/modified-at question-group)}))
 
-(defn get-form-definition [form-id]
+(defn get-form-definition [form-id registration-form-id]
   (let [form-dao (com.gallatinsystems.survey.dao.SurveyDAO.)
         ;; Includes question groups, but contrary to docstring does not contain questions
         form (.loadFullSurvey form-dao form-id)
         question-dao (com.gallatinsystems.survey.dao.QuestionDao.)
         questions (group-by #(.getQuestionGroupId %)
                             (.listQuestionsBySurvey question-dao form-id))]
-    {:id (str (ds/id form))
+    {:id (str form-id)
      :name (.getName form)
+     :registration-form (= form-id registration-form-id)
      :question-groups (mapv (fn [question-group]
                               (question-group-definition question-group
                                                          (get questions (ds/id question-group))))

  (:require [org.akvo.flow-api.anomaly :as anomaly]
            [org.akvo.flow-api.datastore :as ds])
  (:import [com.gallatinsystems.survey.dao.SurveyDAO]
           [org.akvo.flow.api.dao FolderDAO SurveyDAO]))

(defn list [user-id folder-id]

                 survey
                 (anomaly/not-found "Survey not found"
                                    {:survey-id survey-id}))
        registration-form-id (.getNewLocaleSurveyId survey)
        form-dao (com.gallatinsystems.survey.dao.SurveyDAO.)
        all-forms (.listSurveysByGroup form-dao (Long/parseLong survey-id))
        forms (.filterByUserAuthorizationObjectId form-dao
