Unable to hide fields in reports while using "hidden_fields"

**Description:**Unable to hide fields in reports while using “hidden_fields” in properties.json

Attachments:
hidden_fields

Hi @bindugowrig

I’ve just tested this on my local installation and I got it to work though there are a couple of tricks to it!

Firstly the hidden_fields property needs to be at the top level. It’s hard to tell from your thumbnail but it looks like it’s nested under context. For example:

{
    "icon": "icon-person",
    "title": "Undo death report",
    "context": { ... },
    "hidden_fields": ["undo"]
}

Secondly, when you run upload-app-forms you may see a warning in the console like this…

WARN Ignoring unknown properties in [filename]: hidden_fields

This warning is incorrect and should be ignored. The field should be hidden as expected. I’ve raised this issue to remove the warning. Make sure you run convert-app-forms before running upload-app-forms because it’s the convert step which applies the marks the fields as hidden.

Thirdly, please note that the field is only applied to reports submitted with the new config - it won’t apply to existing reports. So be sure to submit a new report when testing this feature.

Finally, it looks like we have no documentation for this feature so I’ve raised an issue to document how to use it!

1 Like

Thanks for the quick reply @gareth .I tried above solution and its working