Questions with multiple text fields

2196
7
02-24-2020 08:34 AM
SamirFarhat
New Contributor II

I have a survey question that requires the user to input data into three text fields. For example,

"what are the three top sellers?"

1.User input 1   2.User input 2   3.User input 3

Is there any way to set this up?

0 Kudos
7 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Samir,

Are you referring to a horizontal layout of questions?  You may want to look at the theme-grid styling option; Appearance—Survey123 for ArcGIS | Documentation 

SamirFarhat
New Contributor II

Stylistically, yes. But can these be set up, such that, each question has up to three responses? Not three choices, but three text fields, each able to receive an input.

0 Kudos
by Anonymous User
Not applicable

Samir, this can be done and you would use the method that James outlined with the appearance of the question. Then within Survey123 Connect you could do the following -

  1. Use the Grid Theme appearance on the group that contains the question you want to have three responses to.
  2. Create a note question to hold "What are the top three sellers?
  3. Create 3 questions that are text fields and have a Distinct Field Name TopSeller1, TopSeller2, & TopSeller3 for the "name" column
  4. Within the "Label" column add in 1., 2., and 3. for them to rank what are the top sellers.
  5. You might want to make each of these required; that's up to you.
  6. Then you could also have a third field that is hidden that will concat() all 3 answers into one field.

You could also set the "bind::esri:fieldType" to "null" for the three questions that will contain the rank and they will not be submitted into your Hosted Feature Service. I have uploaded an example XLSX form for you.

Good Luck,

Mike

SamirFarhat
New Contributor II

Ok. I think I narrowed down the issue. My xlsform does not have the grid theme in the appearance drop down. I can write it in, but it has no effect on the appearance when I do that. Also missing from the appearance types is the table-list type. Any idea how to add these?

0 Kudos
DougBrowning
MVP Esteemed Contributor

First make sure your Connect is up to date.

Then See this post.   https://community.esri.com/thread/197337-how-do-i-update-xls-form-to-conicide-with-update-of-survey1... 

by Anonymous User
Not applicable

Currently, the XLSX form will not contain the "theme-grid" within the "appearance (column I) field" drop-down selection on the "survey" tab. Instead you will need to place "theme-grid" into the "style (column G) field" within the "settings" tab of the XLSX form. 

The "appearance (column I) field" drop-down selection will not contain the "w#" value in front of the appearance choice either. You will need to select your appearance type first, then double click within the field, add in the w#, then hit return and select "yes" to the non-standard input question you will be prompted with.

In terms of updating your form to contain the "table list" and other functionality, you should be able to follow Doug's instructions from his linked post. That is the way I have done things since Survey123 was released and it seems to help with updating the forms. However, this could be a potential enhancement for Survey123; to update an out-dated XLSX form to the most recent standard XLSX form that would be created by the most current version of Connect.

SamirFarhat
New Contributor II

Thank you for all the help. I think I have this figured out. There were actually a few things going on. First, the new survey was created using the Basic template. This template does not have the table-list appearance option in the drop-down. I went back and started the survey with the advanced template. Second, the theme-grid style would have allowed me to accomplish exactly what i needed, which was to style the survey in a way that allowed the three text questions on the same line. The issue was that I was trying to use the theme-grid in conjunction with the table-list appearance, these are currently incompatible. Finally, the table-list appearance can only be used with select_one types, so that would not allow for the formatting I was looking for. My solution involved setting up the "top three" questions using Mike's suggestion above and not using the theme-grid since elsewhere in the survey I am using the table-list appearance option.

There is already an open suggestion to be able to use the theme-grid and table-list in the same survey. I think that would a useful feature.