Data validation (real-time edit checks)
Messages can be used to inform users about required actions or warn them about possible errors, based on data they have entered.
Follow these steps to set up a message:
- Click the 'Data validation' tab when creating/editing a field.
- Choose the condition (the entered value) that will prompt the message.
- Choose the message type. There are four types of messages:
- Message: A simple indication that the user needs to take a certain action.
- Warning: A message to warn the user that something is incorrect.
- Error: A message that indicates data has been entered that must be wrong; when this message is displayed the data for that field is not saved. This means that a subsequent field cannot be dependent on a value that would trigger the Error message.
- Exclusion: A message that excludes the subject from the study; when this message is visible the user cannot continue to other steps (data entry is blocked). You can use this for validating inclusion and exclusion criteria. Please be aware, that it's not possible to leave fields with exclusion criteria empty (user missing), nor possible to enter values which are outside the boundaries you have set.
In the following example an exclusion message is set when the patient has not signed informed consent:
Dependencies (field logic)
If you want to make a field dependent on another field, e.g. only show the question "Pregnant" when the field Gender is set to "Female", take the following steps:
- Click on the 'Dependencies' tab.
- Choose 'Yes' for the 'Field is dependent' property.
- Choose the Step where the parent field is located. The parent field is the field that your new field will be dependent on, such as 'Gender'.
- Choose the parent field.
- Choose an operator, e.g. 'equal to' or 'greater than' and then choose a value - this is the value the parent field should have in order for the new field to appear.
In this example, the current field is only displayed when the field "Gender", on the Step "Demographics" is set to "Female":
Field dependencies will be displayed in the Form Builder alongside the field label - it will be shown in your Form that this field only appears when the defined rule is true:
Currently it is only possible to select one condition for a dependency. If you want to set multiple dependencies, e.g. show your new field based on data entered in multiple other fields, then you will need to create a calculation field and use a template described in this article: Can I make a field dependent on multiple fields?