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:
To access the latest versions for all forms make a call to http://yourserver/form/latest-form-versions. For demo server call to http://46.101.51.199:8080/oweb/form/latest-form-versions
...
If you find any formDataDefinitionVersion prior to lesser than the mentioned version, on your client, then download the form by http://yourserver/form/form-files?formDirName=THE_FORM_TO_DOWNLOAD. For demo server call to http://46.101.51.199:8080/oweb/form/form-files?formDirName=THE_FORM_TO_DOWNLOAD . Where formDirName is the form directory name containing form files.
...