Form Autodownload for Client

All forms in OpenSRP for Client apps are maintained on server in form directory in application core resources.

Form Structure:

Each form is composed of three files model.xml, form_definition.json, form.xml in a separate directory named by unique name for form.

Each form has three properties

  • formName: The Name/ID specified in xls form by science team. This is also used to link nodes in model.xml and form_definition.json as bind
  • formDirName: The name of folder with which developers access form file in enketo. All three files are in this directory
  • formDataDefinitionVersion: The version of form to keep track of the form used for data submission

Form Access:

{"formVersions" : [{"formName": "ANC_Close_EngKan", "formDirName": "anc_close", "formDataDefinitionVersion": "2"},

{"formName": "ANC_Registration_OA_EngKan", "formDirName": "anc_registration_oa", "formDataDefinitionVersion": "4"},

.......,

{"formName": "Child_Vitamin_A_EngKan", "formDirName": "vitamin_a", "formDataDefinitionVersion": "1"}]}