Select to view content in your preferred language

Custom URL for Survey123 web form?

4906
21
01-10-2018 08:01 AM
ShaneClarke
Esri Contributor

Is there a way to open a Survey123 web form and pass field parameters to the web form?
Here is what I want to do: I want to create a hyperlink to open the Survey123 web form and pre-populate fields, including passing the x,y coordinates for the geopoint location. Any suggestions on how to do this?
(Are custom-URL parameters only supported for the Survey123 apps, or are they also supported for the web form?)
Thanks!

Tags (2)
0 Kudos
21 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Shane,

Currently, parameters are supported by forms on the web that have been created using Survey123 Connect, with the same basic pattern for field population as exists in the app URL.  One of the improvements coming in 2.6 will be to make the web form used by Connect-authored forms the web form for all new forms (surveys previously authored with the Web Designer will need to be republished).

TylerGrosshuesch2
Emerging Contributor

Hi James,

Could you give an example of a working URL? I tried a few things and didn't get it to work yet. This url

https://survey123.arcgis.com/?itemId=a74e3a51a1a34a709fc05bb4e8cf092f&field:station_name=test 

just takes me to this page: https://survey123.arcgis.com/ . 

Tyler

0 Kudos
ShaneClarke
Esri Contributor

Hi Tyler,

Try this URL:

https://survey123.arcgis.com/share/a74e3a51a1a34a709fc05bb4e8cf092f?field:station_name=test 

The syntax is slightly different to what you had.

Shane

TylerGrosshuesch2
Emerging Contributor

Thanks Shane! That did it.

AndrewRyan3
Regular Contributor

Thanks Shane for this answer, it helped me with a problem I was having. Does anyone know what the proper syntax is for sending the geometry to the survey123 webapp. I have Latitude and Longitude that I want to pass to Survey123, but the syntax "&center={Latitude},{Longitude}" doesnt seem to work for when opening the webapp of survey123. does the "?" replace the "&"?

Thanks!

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Andrew,

As Shane's post indicates, the variation between the field app and the web form is that the ID of the form occurs in the main part of the URL (to the left of the ?).  In the URL, the ? separates the page address (left) from parameters (right); multiple parameters are joined by using an & .  If you are only passing the center location,

https://survey123.arcgis.com/share/<formID>?center=<lat>,<lon> 

is the correct syntax.

0 Kudos
AndrewRyan3
Regular Contributor

Hm, I must have something wrong with my latitude longitude attributes, or the way I am passing them, because I can pass other attribute information to the webform fine, but the "center" is not working. My url looks like this right now.

https://survey123.arcgis.com/share/SURVEYID?field:PolygonID={OBJECTID}&center={Latitude},{Longitude}

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Andrew,

Can you try copying & pasting the URL from the pop-up and make sure that the values appear as you expect?

0 Kudos
AW_Grove
Regular Contributor

I am also having the same issue mentioned by Tyler, but ONLY with the web form of Survey 123. The coordinates (center=) pass without issue in Collector.

Collector url (centers asset on X,Y): 

arcgis-survey123://?itemID=afa0d9f8fcfa4751868eec4da2795d31&field:UNITID={UNITID}&field:COMPKEY={COMPKEY}&field:ASSETTYPE:{UNIT_FUNCTION}&center={WGS84_Y},{WGS84_X}

Web url (centers asset on 0,0):

https://survey123.arcgis.com/share/afa0d9f8fcfa4751868eec4da2795d31?field:UNITID={UNITID}&field:COMP...