Awell Health Developer Hub
Dev Hub

This query allows us to fetch the details and questions for a specific form and can be used to render the form and its questions in your UI.

Evaluating display logic

A form may have questions that are conditionally shown/hidden based on previous answers in the form, which can be referred to as question visibility logic. In order to ensure you're always showing the right set of questions, you have 2 options:

  1. Implement the logic yourself to evaluate the display logic and show/hide questions based on the answers given in a form. You can find the display logic under the rule field.
  2. Use the evaluateFormRules mutation and just send us the intermediary responses on the questions and we'll let you know what questions need to be shown/hidden. Click here for more information on this mutation.

Metadata

Form and question metadata is returned in all form queries as a JSON string rather than a JSON object. This is because the metadata is defined in Studio as a JSON string and we want to avoid any potential parsing errors. You can parse the metadata string into a JSON object in your application (for example, using JSON.parse in JavaScript/TypeScript, json.loads in Python or json_decode in PHP or Ruby).

Request

Query

01

Variables

01

Where to find the form id

The id of the form can be found in the object.id field of an activity.

01

How to use