Select to view content in your preferred language

Hiding groups of questions using URL parameters

1506
3
Jump to solution
04-08-2022 02:33 PM
ZField
by
Emerging Contributor

I have a lengthy list of questions that I created in Survey 123 and would like to have embedded into a StoryMap in sections. I'm hoping to be able to hide specific groups of questions using the URL parameters that are available, however, I'm not able to get them to work.

More specifically, I'm attempting to format my StoryMap as follows:

StoryMap Content (maps, text, etc)
- Group 1 questions (embedded)
Continued StoryMap Content (maps, text, etc)
- Group 2 questions (embedded)
Continued StoryMap Content (maps, text, etc)
- Group 3 questions (embedded)

I understand that at the end of the Survey 123 URL that you use to embed the questions, you can use the ?hide=header,description,footer,theme parameter to hide the header, etc. but how do you use the hide parameter to hide a specified group of questions?

Please help!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
PeterKnoop
MVP Regular Contributor

See the description for the "hide" parameter in Integrate with other apps - Parameters for a web app, and it is "field:fieldName" that I think you are after. 

If your groups of questions have the fieldNames of group1, group2, and group3, and you want to only show the first group of questions, then your URL would look like:

https://survey123.arcgis.com/share/<survey_itemId>?hide=header,description,footer,theme,field:group2,field:group3

 

View solution in original post

3 Replies
PeterKnoop
MVP Regular Contributor

See the description for the "hide" parameter in Integrate with other apps - Parameters for a web app, and it is "field:fieldName" that I think you are after. 

If your groups of questions have the fieldNames of group1, group2, and group3, and you want to only show the first group of questions, then your URL would look like:

https://survey123.arcgis.com/share/<survey_itemId>?hide=header,description,footer,theme,field:group2,field:group3

 

ZField
by
Emerging Contributor

Thank you so much, Peter!

This worked for hiding the question names (q1, q2, q3...), but I couldn't get it to work for the groups labels (group1, group2, group3). So I ended up forgoing the groups altogether and embedded the following URL to only show the first 3 questions:

https://survey123.arcgis.com/share/<survey_itemId>?hide=navbar,header,footer,theme,description,field:q4,field:q5,field:q6,field:q7,field:q8,field:q9,field:q10,field:q11,field:q12,field:q13,field:q14,field:q15,field:q16,field:q17,field:q18,field:q19,field:q20,field:q21,field:q22,field:q23,field:q24

0 Kudos
PeterKnoop
MVP Regular Contributor

Glad to hear you found a way to make it work for you!

Hiding groups works for me, so you might just double-check that you have the correct fieldNames for your groups.

If you authoring your form in Survey123 Connect, the fieldNames for everything are in the "name" or second column of the XLSForm.

If you are authoring your form on the web, then I don't know of a way to directly view groups' fieldNames.  (You can view the question fieldNames by selecting Modify Schema when publishing; they are shown in the Name column of the table.) I usually use Survey123Connect to create a new survey from the web-authored one, then view the auto-generated fieldNames for the groups in the resulting XLSForm. Or, you can make an educated guess at the group fieldNames based on their Label (e.g., a group labeled "Group 1" gets an autogenerated fieldName of "Group_1"; spaces and other special characters in the label are replaced by underscores in the fieldName.)

0 Kudos