Select to view content in your preferred language

Hidden field

13296
10
Jump to solution
05-26-2017 01:43 PM
MichaelJabot
Occasional Contributor

Could someone please share an example of a hidden field. I can not seem to get the syntax correct. THANK YOU!

1 Solution

Accepted Solutions
MichaelKelly
Frequent Contributor

There are two main ways of hiding fields.

1. Specifying hidden as the field type (as in rows 3 and 4 in the attached Excel document). You use the bind::esri:fieldType column to specify what you want the field type to be:

typenamelabelbind::esri:fieldType
hiddenHiddenStringHidden StringesriFieldTypeString
hiddenHiddenIntegerHidden IntegeresriFieldTypeInteger

2. Using the relevant column to hide a question (as in rows 5 and 6 in the attached Excel document):

typenamelabelrelevant
select_one ListYesNoShowNextQuestionShow Next Question
geopointLocationSelection Location${ShowNextQuestion}='Yes'

Hidden fields will never be displayed in Survey123, whereas fields with relevancy set on them will be displayed if the specific condition is met.

You can check exactly what will be published in the Schema Preview within Survey123 Connect:

View solution in original post

10 Replies
MichaelKelly
Frequent Contributor

There are two main ways of hiding fields.

1. Specifying hidden as the field type (as in rows 3 and 4 in the attached Excel document). You use the bind::esri:fieldType column to specify what you want the field type to be:

typenamelabelbind::esri:fieldType
hiddenHiddenStringHidden StringesriFieldTypeString
hiddenHiddenIntegerHidden IntegeresriFieldTypeInteger

2. Using the relevant column to hide a question (as in rows 5 and 6 in the attached Excel document):

typenamelabelrelevant
select_one ListYesNoShowNextQuestionShow Next Question
geopointLocationSelection Location${ShowNextQuestion}='Yes'

Hidden fields will never be displayed in Survey123, whereas fields with relevancy set on them will be displayed if the specific condition is met.

You can check exactly what will be published in the Schema Preview within Survey123 Connect:

ReneAubut
Regular Contributor

When using hidden questions in Survey123 forms, I notice that these fields are by default invisible in ArcGIS Pro, but visible in Survey123 Web page. Of course I could set these fields to invisible in the table section but I need to set this every time i open the feature layer in Survey123 Web page. Is it possible to have it by default to invisible?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Rene, 

I'm not sure what you are referring to by hidden questions being hidden by default in ArcGIS Pro - that should not be the case (and is not the case in my testing).

0 Kudos
ReneAubut
Regular Contributor

HI James, the added image shows the fields visibility upon adding my Survey123 Feature Layer in Pro. My hidden type questions are not visible as I want it to be. When viewing the same feature Layer in the data tab of survey123, all these hidden fields are visible

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Rene,

Again, I would not expect hidden fields to be hidden automatically if published by Survey123.  Could you share the JSON of the feature layer info?  I'm not sure why Pro would be hiding fields unless it was specified there.

0 Kudos
ReneAubut
Regular Contributor

James, I presumed it is the forminfo.json

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Rene,

I was asking for the JSON version of the 'Service URL' you can get to via the Item Details page of the feature service.

0 Kudos
ReneAubut
Regular Contributor
0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Rene,

The service is secured; that is why I was asking for the JSON.  Perhaps opening an Esri Technical Support ticket would make this a bit quicker to diagnose than relying on the GeoNet forum.

0 Kudos