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.
The National Willow Tit Survey is an example of embedding a survey in a web app.
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:
Available parameters are listed in the following table:
Centers the map to known latitude, longitude, and optional altitude.
Populates survey questions with field values.
Specifies the URL to the portal where the survey item is hosted.
Specifies the app used to open the survey. Valid values are
Hides elements of the survey in the web app. The parameter can accept multiple values separated by a comma. Valid values are
Switches the language of the survey. It only works if the survey includes multiple languages.
Sets the mode of the web app. Valid values are
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.
Can only be used with
Sets the version of the web app that will be used. The only valid value is
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.
Refreshes the survey after submission. Specify the delay (in seconds) before the survey is refreshed.
Obscures URL parameters. The resulting URL will instead include a
Sets the width for the survey, in pixels. This also affects other controls within the survey, such as text boxes.