Using the "Embedded Form" field type, you can include an entire form (the embedded form) inside another form (the parent form). You can pass values between the embedded and parent form to drive logic and validation.
For example, your project might have a common consent/eligibility form that is a pre-requisite for other forms. Instead of duplicating the consent/eligibility questions in each form, you can "embed" the complete consent/eligibility form inside any other form in the project. You could pass the respondent's name (and any other information) to the consent/eligibility form, capture their consent, determine eligibility and return the result to the parent form indicating whether or not they have consented and are eligible to continue.
Note: Embedded Form fields are only available to Premium plans and above. If a form containing an embedded form field is imported into a lower plan it is ignored during the import process.
The steps to use an Embedded form field are outlined below:
Select to add an 'Embedded form' field to your form (e.g 'Household assessment questionnaire') from the “Add Field / Group” popup.
- Open the Basics tab of the Embedded form field.
- Select the form you wish to embed.
- In the parent form, an Embedded form field is displayed as a button with a default label of "Open embedded form". This label can be updated as needed. You can use field references in the button label, e.g. "Capture consent for $participant_name".
4. Fields from an embedded (child) form that you wish to access in the main (parent) form can be selected from the Get fields tab. The selected fields can then be referenced in the main form using the '$' symbol - note that the field must be referenced by pre-pending the embedded form field name: for example, if the embedded form field is named "consent_form" and contains a field called "consent_given", the reference for the field would be $consent_form.consent_given. The fields selected in this tab will also be included as part of the parent form submission in Analytics.
5. Fields in embedded form can also be set from the parent form (including passing values captured in the parent form). Open the Set fields tab, select the field(s) in the child form you wish to set, and specify the value(s).
Use the '$' symbol to reference fields from the main form or the '=' symbol to add functions and operators.
Tip: Select the Preview button from the toolbar to test and view how your form will be displayed.
6. When completing the main form, the embedded form is launched by selecting the embedded form button (as configured in step 2 above).
Validation for embedded form field types:
- If an embedded form field is marked as required, it must be completed before the parent form can be submitted.
- If an embedded form field is marked as optional, it does not need to be completed to submit the parent form.
- All skip logic and validation rules in the embedded form apply as normal.
- The language of the embedded (child) form is set to that of the main (parent) form so that it's displayed in the same language. If there is no matching language (for example if there is no additional languages available for the embedded form), the default language of the main form is used.
- Languages cannot be switched from within the embedded (child) form.
- The data for an embedded (child) form will remain separate to that of the main (parent) form. Submissions to an embedded (child) form can be viewed, edited or exported from the Analysis page of the child form.
- When the child form is completed, the submission ID is returned to the parent form and is stored as the value of the field type. This submission id is displayed in the analytics grid when viewing the submission data of the main form.
- When viewing/editing a submission of the parent form that contains an embedded form field, you can select to view the embedded form submission by selecting the "View embedded submission"/ "Edit embedded submission" button to open the submission of the embedded (child) form in a separate window.