Hiding Fields in ODK Collect (or Enketo)

Hello ODK Community,

I hope you are doing well. I am currently facing an issue with hiding fields in ODK Collect, and I would appreciate your assistance. Here are the details:

Issue Description:
I have a form and I am trying to hide certain fields within a group using either appearance="hidden()" or nodisplay="true()". However, the fields are still visible in ODK Collect despite these settings.
Form Structure:


ODK Collect Version: v2023.3.1
XLSForm Converter Used: https://getodk.org/xlsform/

Attempts Made:
I have tried both appearance="hidden()" and nodisplay="true()", but the issue persists.

If anyone has encountered a similar issue or has insights into resolving this problem, I would greatly appreciate your guidance. Additionally, if there are alternative approaches to hiding fields conditionally, I would be open to exploring those options.

Thank you in advance for your help!

Best regards,
Jaseem

Welcome @Jaseem_Jan ,
These are not valid appearance options, see ODK XLSForm Template.

The normal way to "hide" fields conditionally is the relevant clause, see documentation, please: https://xlsform.org/en/.

Other options to hide fields, but statically, are calculate (and hidden) type. And fields without label, but with calculation, see below,

Sometimes, a workaround for fields with values could be to use dynamic read_only in Collect (not yet working in Enketo).

Dear @wroos thanks for response.

No, there no specific conditionality involved. They actually gets input/values from other fields using calculation attribute/Column. No user input is required so I want to keep it hidden to reduce questionnaire overall timing. here i am sharing a more detailed screenshot of actually scenario.

I know another way is to make it READ_ONLY, But it would still display the response which I don't want to.

Best,
Jaseem

So, you can use a calculate type, see link (blue) above, please.

I add an example, how to hide other types, e.g. text, selects: Hide02.xlsx (18.4 KB).
See also documentation.
You need to avoid a label and add a calculation. A default or only a missing label will not work and will result in an error:
image
Also, an empty ${RefVar} as label doesn't work for hiding (neither pre-set or entered as "").