The Survey123 web app can accept parameters in the same format as the field app. One distinction to note is that the item ID for the survey is part of the URL path rather than a URL parameter like the other links use for opening surveys. When you add parameters to this URL, you must use a question mark to separate the survey item ID in the path from the first parameter and then use ampersands to separate subsequent parameters. The following example URL passes the surname and coordinate parameters to a survey in the Survey123 web app:
https://survey123.arcgis.com/share/36ff9e8c13e042a58cfce4ad87f55d19?field:surname=Klauser¢er=37.8199,-122.4783
The Survey123 web app also supports a number of parameters that the Survey123 field app does not. These parameters relate to the presentation of the survey in a browser. Refer to the following table for URL parameters and examples that customize how the web app opens.
Note:
If a parameter value includes spaces, plus signs (+), or other special characters, these characters should be percent-encoded. For more information, see URL encoding.
URL parameters for launching the web app
Parameter | Description | Type |
---|---|---|
signIn | For public surveys, shows the sign-in button or requires users to sign in. By default, the web app does not provide a method for users to sign in for public surveys, but public surveys can include features that only work when users are signed in. An example is using a calculation to extract a signed-in user's email address. Valid values are show, which displays the sign in button in the navigation bar at the top of the web app; and require, which requires users to sign in by redirecting to the sign-in page. Example:
| String |
isOrgSignIn | Uses the organization-specific sign-in page. By default, Survey123 uses the organization-specific sign-in page, but when sharing surveys to more than one organization, using the ArcGIS Online sign-in page may be preferred. Set this parameter as false to use the ArcGIS Online sign-in page. Example:
| Boolean |
center | Centers the map to known latitude, longitude, and optional altitude. Example:
| String |
field:fieldname | Populates survey questions with field values. Example:
| String |
portalUrl | Specifies the URL to the portal where the survey item is hosted. Example:
| String |
open | Specifies the app used to open the survey. Valid values are web, which opens the survey in the web app (the default); native, which opens the survey in the field app if the field app is installed; and menu, which opens a web page to determine the app that will open the survey. Example:
| String |
hide |
Hides elements of the survey in the web app. The parameter can accept multiple values separated by a comma. Valid values are navbar (the bar at the top of the survey, including options to sign in, sign out, and change language), header, description, footer, submit, theme, and leaveDialog (the warning message that appears when navigating away from or closing the page). You can also use the field:fieldName parameter to hide a specific question, group, page, or repeat, by providing the name in place of fieldName. Questions in repeats cannot be hidden individually. Example:
| String |
locale | Switches the language of the survey. It only works if the survey includes multiple languages. Example:
| String |
mode | Sets the mode of the web app. Valid values are edit, which sets the survey to edit an existing entry rather than create one; view, which opens an existing entry in read-only mode; and copy, which creates a survey that is populated with the contents of the specified entry. When using this parameter, the globalId parameter must also be provided. Example:
| String |
globalId | Specifies the survey record that's loaded into the form. Valid values are the global IDs for existing survey records. The name of this parameter is case sensitive. Example:
| String |
recalculate | Can only be used with mode=edit. This forces specified questions to be recalculated as the survey is loaded, without use of the Recalculate button. Example:
| String |
version | Sets the version of the web app that will be used. The only valid value is latest, which uses the latest version of the web app, even if the survey is version locked. Example:
| String |
token | Passes a valid token for a survey. It can be used to allow respondents to respond to a survey that requires an ArcGIS account to access it without signing in. Example:
| String |
autoReload | Reloads the survey after submission. Specify the delay (in seconds) before the survey is reloaded. It was previously called autoRefresh. The autoRefresh parameter is supported for backward compatibility. Example:
| Integer |
encodeUrlParams | Obscures URL parameters. The resulting URL will instead include a code parameter representing all encoded parameters; parameters included outside of this code parameter will be ignored. Example:
| Boolean |
width | Sets the width for the survey in either pixels or as a fraction of screen width. A value greater than 1 sets the width in pixels. If the pixel value is smaller than the width of the screen, screen width is used. A value between 0 and 1 will set the width of the form as a fraction of the screen width. This also affects other controls in the survey, such as text boxes, and can help improve how the web app displays a fixed or dynamic grid. Examples:
| String |
Note:
The field:fieldname parameter supports geopoint, geotrace, and geoshape questions in the web app. For geopoint questions, specify latitude, longitude, and altitude (optional) separated by spaces. For geotrace and geoshape, for each vertex, specify the latitude and longitude separated by a space, with each pair of coordinates separated by a semicolon. This example would work for a geoshape question:
field:geoshape=-37.842156723211474 144.95942945338243;-37.83554486071995 144.9726235713864;-37.85681405373047 144.98240735651922;-37.85954045531896 144.97715349053766