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
disabledcolumn and mark
TRUEto all those questions that you do not wish to make it visible for the enumerators.
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
disabledcolumn in the dataset. Sample of how it would look:
Now, if you wish to make entries to the
disabledquestions while editing or collecting data you could simply make a small edit by removing the
disabledcolumn as outlined in the image shown below:
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.
Awesome, thank you so much!!
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.
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
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
Where can the disabled feature be found in the KoBo/ODK documentation, please?
Thank you @wroos for the query. We will document this soon in our support articles.