With the ArcGIS Survey123 web designer, you can create surveys for the web app and field app using a drag-and-drop interface. The Survey123 web designer provides a wide variety of question types that you can configure in a number of ways. Behind the scenes, the web designer uses the XLSForm specification. For more advanced XLSForm features, you can continue your design in Survey123 Connect. For more information, see XLSForm essentials.
Survey elements
Options on the Add tab in the Survey123 web designer allow you to control the visibility of the following elements:
- Survey header—The header appears at the top of the form and can be text or an image. For an image header, provide the URL for an image hosted online or upload an image file.
- Survey description—The description appears below the header and can contain formatted text, links, and images.
- Survey footer—The footer appears beneath the Submit button and can contain formatted text, links, and images.
- CAPTCHA—A CAPTCHA is a test displayed at the end of the form that users must solve before submitting a response. Users solve the CAPTCHA by typing the characters shown in the image. You can modify the text that appears above the CAPTCHA by clicking it in the form preview. CAPTCHAs can be enabled when using https://survey123.arcgis.com/ and are supported in the Survey123 web app. CAPTCHAs cannot be configured when the Survey123 website is installed on your infrastructure, and are not supported in the Survey123 field app.
Click an element in the form preview to customize it on the Edit tab.
Question types
The following table lists the question types you can add to your survey through the Survey123 web designer, and how they are implemented in the XLSForm specification.
Caution:
Once a survey that was created with the Survey123 web designer is republished from Survey123 Connect, you can no longer edit the portions of the survey that are managed by the XLSForm in the web designer. For example, the survey title and survey questions cannot be edited. Themes, webhooks, and sharing options can still be edited in the web designer.
Survey123 web designer question | Description | XLSForm implementation |
---|---|---|
Singleline text | A text box with a single line input. | Text question |
Multiline text | A text box with multiple lines of input. | Text question, multiline appearance |
Number | Numerical input, can be a whole number or decimal. | Integer or decimal question |
Date | Date input. | Date question |
Time | Time input. | Time question |
Date and time | Date and time input. | DateTime question |
A limited text box, rejects all inputs not in the form of an email address. | Text question with regular expression constraint | |
Website | A limited text box, rejects all inputs not in the form of a website URL. | Text question with regular expression constraint |
Single select¹ | Multiple choice question; only one choice can be selected. | Select_one question |
Multiple select¹ | Multiple choice question; multiple choices can be selected. | Select_multiple question |
Single select grid¹ | Series of multiple choice questions with identical choices; only one choice can be selected for each. | Multiple select_one questions using the same choice list, in a group using table-list appearance |
Dropdown¹ | Multiple choice question with choices displayed in a drop-down list; only one choice can be selected. | Select_one question, minimal or autocomplete appearance |
Likert scale¹ | Multiple choice question; select one of a series of choices using a symmetric agree-disagree scale. | Select_one question, Likert appearance |
Rating¹ | Multiple choice question; select one of a series of numbers. | Select_one question |
Ranking¹ | A list of choices that can be ordered. | Rank question |
Map | Collects a point, line, or polygon on the map. | Geopoint, geotrace, or geoshape question |
Address | A text box used to locate an address. Note:Geocoding addresses using the ArcGIS World Geocoding Service will consume credits. For more information, see Understand credits. | Text question, geocode appearance |
Image | Take one or more photos with the camera or upload image files from the device. | Image question, potentially with multiline appearance |
File upload | Accepts a file on the device. | File question |
Audio | Record or upload an audio file. | Audio question |
Signature | Accepts a drawing input intended for a signature. | Image question, signature appearance |
Note | Displays text on the screen. | Note question |
Page | Presents questions on a separate page. | Begin group and end group questions, pages style |
Group | Arranges questions in a group. | Begin group and end group questions |
¹ Choice names are limited to 31 characters. Additional characters will be truncated.
After configuring a question, some question types support changing to another type that has the same underlying field type. For example, you may want to change a Single select question to a Dropdown question after you've already configured all the choices. To change the question type for an existing question, click it in the form preview to open the Edit tab, click the Change question type button at the top of the pane, and choose from the list of supported question types. After publishing, some question types cannot be selected from the list. For more information, see Update a survey. When you change the question type, common settings are preserved, such as validation and behavior, so you don't need to reconfigure the question.
Question options
When adding a question to your survey, there are a number of additional options available to alter how the question will appear or behave when the survey is being filled in and submitted by a user. These options are reflected in the XLSForm specification.
The following are descriptions of options that are available for multiple question types; however, not all of these options are available for every question type. For information on options only available for specific question types, see Quick reference.
General and appearance options
Option | Applicable questions | Description | XLSForm equivalent |
---|---|---|---|
Default value | All except for Image, File upload, Audio, Note, Page, and Group | The default value will be present on opening the survey, although the value can be edited. | Provide a value in the default column. |
Calculation | Singleline text, Multiline text, Number, Map, Date, and Date and time | The field will be prepopulated with the result of an expression, potentially including responses to other questions. The Edit button allows you to construct numeric calculations, including on date and time fields, string concatenations, and data extraction from other parts of the survey. For more information, see Calculations. | Provide an expression in the calculation column. |
Show choices in a random order | Single select, Multiple select, Dropdown, and Ranking | The choices for this question will be displayed in a random order. | Set the parameters column to randomize. |
Allow "Other" | Single select, Multiple select, and Dropdown | An additional Other choice will be available, which will reveal an additional text box when selected. | Add or_other to the question type. |
Maximum value | Rating and Likert scale | Sets the maximum amount of possible responses to the question. | The number of choices in a select_one question's choice list. |
Locator | Address and Map | Sets the locator service to use for the question. If not set, uses the organization's default. | Set the appearance column of a text question to geocode, and set the geocode parameter to the locator service's item ID in the bind::esri:parameters column. |
Vertical, Horizontal, and Horizontal (compact) | Single select and Multiple select | Determines whether the choices for the question will be presented vertically, horizontally, or horizontally with each choice being given only as much space as its label requires. | Set the appearance column for the question to either be blank, horizontal, or horizontal-compact. |
Validation options
Option | Applicable questions | Description | XLSForm equivalent |
---|---|---|---|
This is a required question | All except Note, Page, and Group | An answer must be provided to this question to submit the survey. | Set the required column for this question to true. |
Constraint | Singleline text, Multiline text, Number, Date, Date and time, Email, Website, Barcode, Multiple select, Map, Address, Image, File upload | The user is required to provide an answer based on restrictions specified by an expression or a combination of expressions. When the specified condition is not met, the form displays an informative message, which you can customize. | Use expressions in the constraint column. |
Single file size limit | Image and File upload | Sets a maximum file size, in megabytes, for a single file submitted to the question. This is not supported in the Survey123 field app. | Provide a value for max-size in the bind::esri:parameters column. |
The following are examples for specifying constraints with rules to restrict answers:
- For Date and time input questions, limit answers to within a specific range defined for the question.
- For Text input questions, set a minimum and maximum character count so the user is required to provide an answer at least as long as the minimum character count, and no more than the maximum character count.
- For Image and File upload questions, specify a file count so the user is required to upload a minimum, maximum, or exact amount of images or files as the number provided. In XLSForm, this is done by setting the appearance column for the question to multiline and using a count-selected expression in the constraint column.
Other options
- Cache answer—After the survey is submitted, this answer will be automatically populated the next time the user opens the survey. This has no XLSForm equivalent, but the Survey123 field app provides the option to set and apply favorite answers, which works similarly.
- Read-only—The user is unable to provide an answer to this question. The question can only contain defaults or the results of calculations. In XLSForm, this is done by setting the readonly column for this question to yes.
- Hide from survey—The user is unable to see this question, but the question can still store answers populated by defaults or calculations. This option is only available for questions that support defaults or calculations. In XLSForm, this is done by setting the appearance column for the question to hidden.
- Do not submit the answer—This question will not have a field in the feature layer, and the answer to the question will not be submitted. In XLSForm, this is done by setting the bind::esri:fieldType column for the question to null.
Dynamic labels
Notes, labels, hints, and the thank you screen in your 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.
When editing a label, click the insert question value button to display a list of questions that can be referenced.
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.
Calculations
You can calculate the answer to a question using other questions in your survey or survey properties. To create or edit a calculation for a question, click Edit next to the Calculation option.
The following question types support calculations:
- Singleline text
- Multiline text
- Number
- Date
- Date and time
- Map
For example, the location from a map question can be used to populate a singleline text question. Similarly, the location for a map question can be derived from the EXIF metadata of a photo submitted to an image question. In the following example, the map question named Location is populated with the Location from EXIF of the Photo question:
By setting Source to Layer, you can query an ArcGIS feature layer or table and use the result of the query as the answer to the question. You can perform an attribute query or a spatial query. In the following example, the text question named Country is populated with the Country Name from the World Countries feature layer. In the survey, users specify a location in a map question named Location, and the country that the location falls within is returned from the feature layer.
When using calculations to create a string, questions being referenced must have the joins operator placed before and after them, unless at the start or end of the calculation. Text can be entered freely outside of these questions.
Caution:
Mathematical expressions with empty values will not evaluate, and the question containing the expression will remain empty. Consider assigning a default value of 0 to number questions that contain an expression.
Device and user properties
The following table lists device and user properties that can be referenced by calculations:
Property | Description |
---|---|
Username | ArcGIS organizational account username of the currently signed-in user. |
User full name | First and last name of the currently signed-in user. |
User first name | First name of the currently signed-in user. |
User last name | Last name of the currently signed-in user. |
User email | ArcGIS organizational account email address of the currently signed-in user. |
Language | Language used in the current survey. |
UTC offset | Offset in hours from UTC for the local time zone. |
User agent | User agent string for the user's device. |
Visibility rules
Visibility of a question can be set to always be visible (checked), always be not visible (unchecked), or set by a rule.
Click Set rule to create a visibility rule and choose another question in the survey whose answer will control the visibility of the selected question. When the visibility rule is not met, the author can choose whether answers are submitted. Choosing not to submit the answer is the same as using the relevant column in XLSForm. Choosing to submit the answer is the same as using the bind::esri:visible column in XLSForm.
When question visibility is controlled by a visibility rule, the Visible option shows as indeterminate (partially checked) state.
You can copy a visibility rule to one or more questions in a survey. To copy a visibility rule, select the question that has the rule applied to it and click Set rule. In the Visibility rule panel, click the Copy visibility rule button . Select the target questions to which you want to copy the rule. Existing visibility rules will be replaced.
Note:
For Image, File upload, Audio, and Signature question types, answers cannot be submitted when the question is not visible.