I’d like to have a field (e.g. text field or integer), but don’t want to show it on the form

Hi, I think I’m missing something obvious, but… I’d like to have a field (e.g. text field or integer), but don’t want to show it on the form. How can I hide it?

Maybe you could do the following workaround using the disabled feature as outlined in the steps shown below:

  • Create a survey form with a disabled column and mark TRUE to all those questions that you do not wish to make it visible for the enumerators.
    image
    You could also use the following xlsform:
    Disabled.xlsx (9.6 KB)

  • Now deploy the survey project.

  • Collect data and submit them to the server. You should see the disabled column in the dataset. Sample of how it would look:

  • Now, if you wish to make entries to the disabled questions while editing or collecting data you could simply make a small edit by removing the TRUE from the disabled column as outlined in the image shown below:
    image
    You could use the following xlsform:
    Disabled.xlsx (9.6 KB)

  • Now replace the xlsform that you have edited and then redeploy.

  • You will now be able to add comments to those variables that you had disabled previously.

2 Likes

Awesome, thank you so much!!

1 Like

Hello @Kal_Lam,
Is there any documentation on this?.
(Didn’t find anything in https://xlsform.org, https://getodk.github.io/xforms-spec/ or https://xlsform.org/en/ref-table/)
Feature disabled is new? Since when?

This disabled could probably also be used to hide sensible data (by a new form version).
What is the result on export and report?.

Type hidden (documented) is another option (but more restricted, e.g. not allowing to hide select_.).
Even calculate type with calculation now("") might work (example for text).
Also a user-ID related relevant might do the job, not needing a new form deployment.

Kind regards

Hi @wroos,

Regarding your first queries:

This post should answer your query:

Regarding your second queries:

It only hides the questions while collecting data. It does not hide the data while downloading even though you have disabled some questions while downloading. The same principle follows while viewing the disabled questions in the custom report or in the DATA>Table view.

Regarding your third queries:

The similarity between a hidden question type and a disabled feature is that they both hide a question while collecting data. But the main difference between the two is that a hidden question is able to collect data if you have some default values or some calculations in it but with a disabled feature you are not able to collect any information whether it is from a default value or a calculation.

1 Like

Hello @Kal_Lam,
Where can the disabled feature be found in the KoBo/ODK documentation, please?
Kind regards

1 Like

Thank you @wroos for the query. We will document this soon in our support articles.