Notes provide further information and instruction when designing a survey. Notes can contain text, images, video, or audio.
HTML formatting
Applying formatting to notes can help draw attention to important information. You can also use a hyperlink to provide links to phone numbers and emails. The following example will display in your survey as a link that, when selected, will have the user's phone number.
<a href="tel:555-555-5555">555-555-5555</a>
If the device is not a phone, the user will instead be prompted to select a phone app they have installed. This is ideal for situations such as presenting emergency numbers.
Similarly, you can also link to an email address. This, for example, would open the device's chosen email client when selected and send an email to the address referenced.
<a href="mailto:example@example.com">Email</a>
For more information on supported tags, see Style a survey.
Dynamic labels
Notes, labels, and hints in a survey can display the contents of another question by referring to the question name in the text using the format ${field_name}. This can be useful to display the contents of fields that don't need to be exposed otherwise, such as calculations based on previous answers, or the name of a person being surveyed from a previous question in the label of the next question.
Calculations can't be performed in a label or hint. To display the results of a calculation, ensure the calculation is in a question.
Caution:
Dynamic labels are not supported in choice lists.
Visually combine notes
The XLSForm format only allows one of each type of media (image, video, or audio) to be added to a note question. To work around this limitation, subsequent notes will be visually merged so that they appear as one note in the form. This means you can include multiple note fields one after another in the survey. When viewing the form, the notes will appear as a single note.
Notes in the feature layer
Depending on how a note is configured in the XLSForm, the question behaves differently when the survey is published.
If a note is given a name, a string field is created for the note. A user filling in the survey in the Survey123 field app cannot input anything in this field, but any default or calculated value held in it will be submitted to the feature layer. Note questions with a name can also be omitted from the feature layer by setting bind::esri:fieldType to null.
If a note has no name, no field is generated for the note in the feature layer. It acts only to display read-only text in the form. The note question will be shown in the Schema tab with a generated_note_ prefix and a null field type.
If a republished survey will add a field to the feature layer, you will be warned that this change will add a field.
You can add special note questions to customize elements of the form UI. These notes are named with the generated_note_ prefix, and fields are not created in the feature layer for these notes when the survey is published. For more information, see Customize form elements.
Note:
Note question names in surveys created in the Survey123 website are prefixed with generated_note_ to ensure the note doesn't get a field in the feature layer. These prefixed field names must not be removed or renamed, and the question should not have bind::esri:fieldType set to null, as this will cause a conflict in the website.
Customize form elements
You can customize elements of the form UI using note questions with specific names. Elements that you can customize include the thank you screen, form title, and footer. The question names are as follows:
Question name | Form element |
---|---|
generated_note_form_title | Form title and survey description |
generated_note_form_submit_text | Submit button text |
generated_note_form_footer | Survey footer |
generated_note_prompt_submitted | Thank you screen content |
generated_note_prompt_captcha | CAPTCHA verification text |
The following example demonstrates how to customize form elements in a survey. The form title and thank you screen are personalized with the visitor_name question.
When customizing form elements, consider the following:
- All of these elements are visible in the Survey123 web app, while only the form title is visible in the Survey123 field app.
- You can provide translations for generated_note_ questions. For more information, see Translate form elements.
- All of these notes support HTML content, except for generated_note_form_submit_text.
- You can include values from the survey response in these notes using the ${question_name} syntax.
- Specify the form title in the label of the generated_note_form_title note question.
- Specify the survey description in the hint of the generated_note_form_title note question.
- If a survey has a generated_note_form_title note question, the form_title on the settings sheet will be ignored.
- If a survey has a generated_note_prompt_submitted note question, the thank you screen content set in the Survey123 web designer will be ignored.
- Note questions with the generated_note_ prefix are not shown as notes in the form, and fields are not created in the feature layer for these questions when the survey is published.
Note:
Previously, the survey title and description could be customized in a note question named generated_note_form_description, generated_note_surveyHeader, or generated_note_surveyDescription. Any questions with these names will no longer customize the survey title and description and will be displayed as a standard note question. The survey title and description can be customized in the label and hint of the generated_note_form_title question.
Groups named generated_group_coverPage are created by the web designer for surveys with pages, for use in the web app. These groups are ignored in the field app and Survey123 Connect.