Embed a survey using an iframe

You can embed a survey in your custom web app using an inline frame (iframe).

Embed a survey in ArcGIS Dashboards

ArcGIS Dashboards allows you to convey information by presenting location-based analytics using intuitive and interactive data visualizations on a single screen.

You can embed a survey in a dashboard using the embedded content element. When using this element, you must choose the feature layer to target, add the URL to your survey, and set the maximum number of features to display. Optionally, you can add parameters to load an existing survey record.

An example of embedding a survey in ArcGIS Dashboards is described in the Survey123 Tricks of the Trade: Embedding a survey in an ArcGIS Dashboard blog post.

Embed a survey in a custom web app

To embed a survey directly in your custom web app, create an iframe element and add HTML that represents the survey.

On the Collaborate tab of the Survey123 website, click the Embed in website link under the Share this survey section to open a tab that provides HTML to embed your survey in a web page.

In the Embed options section, you can hide cosmetic survey elements when embedded. Elements that can be hidden include the options at the top of the survey, the header, the survey description, and the footer, as well as the option to ignore the survey's theme.

Parameters

When you embed a survey in either ArcGIS Dashboards or your custom web app, you can add parameters to control the way survey is displayed.

The following ArcGIS Dashboards example displays the form for a selected record in edit mode:

Use dark colors for code blocksCopy
1
https://survey123.arcgis.com/share/acb28b212b5542acbbdbaa35feba0765?mode=edit&globalId={globalid}

Available parameters are listed in the following table:

ParameterDescriptionExampleType
centerCenters the map to known latitude, longitude, and optional altitude.center=37.8199,-122.4783,20String
field:fieldnamePopulates survey questions with field values.field:surname=KlauserString
portalUrlURL of the portal where the survey item is hosted. If not supplied, default is https://www.arcgis.com/.portalUrl=https://myorg.arcgis.comString
openSpecifies 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.open=webString
hideHides 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 log in, log out, and change language), header, description, footer, submit, theme, and leaveDialog (the warning message displayed 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.

hide=header,description,footer,themeString
localeSwitches the language of the survey. It only works if the survey includes multiple languages.locale=zh-cnString
modeSets 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.mode=edit&globalId=42db492cb06111ea...String
globalIdSpecifies 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.globalId=42db492cb06111ea...String
recalculateCan only be used with mode=edit. Forces specified questions to be recalculated as the survey is loaded, without use of the Recalculate button.recalculate=field:question1,field:question2String
versionSets 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.version=latestString
tokenAn access token that identifies the authenticated user with the portal. Required when survey is not shared to Everyone (Public).token=E60M4Gsc-h4Q8plqQ...String
autoRefreshRefreshes the survey after submission. Specify the delay (in seconds) before the survey is refreshed.autoRefresh=3Integer
encodeUrlParamsObscures 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.encodeUrlParams=trueBoolean
widthSets the width for the survey, in pixels. This also affects other controls within the survey, such as text boxes.width=1000Integer

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.