medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
467 stars 217 forks source link

Implement Actions and Events as per ODK XForm Specification #4131

Open abbyad opened 6 years ago

abbyad commented 6 years ago

As a way to solve #4105, @lognaturel mentioned the Actions and Events from the ODK XForm specification. ODK Collect currently implements the xforms-ready event only, and will soon support xforms-value-changed as well. Neither are currently implemented in Enketo. For the purposes of have variable defaults we would need both of these actions.

Here is a simple form which uses parts of ODK's examples. Since events and actions are not yet supported by pyxform changes were made manually in XForm.

alxndrsn commented 6 years ago

Asked on ODK slack at https://opendatakit.slack.com/archives/C3K3P0WS2/p1519150596000410