Skip to content

Deprecate NO_LABEL usage in forms #771

@jkuester

Description

@jkuester

What feature do you want to improve?

Currently in the form xlsx configuration, if you do not want to display a label for a field, you can add "NO_LABEL" as the label value and the label will not be displayed. The problem is that this is not spec-compliant for ODK forms and instead is functionality bespoke to the CHT. It requires us to maintain custom logic here in cht-conf to deal with this (and also for a long time in pyxform).

Describe the improvement you'd like

My belief is that the valid cases where a label should not be shown in are actually currently supported by the ODK spec (and by normal pyxform functionality). If you have a field that should never be shown to the user, use hidden or calculate. For groups, a label should never be required and I have opened an upstream PR (XLSForm/pyxform#786) to remove even the warning that gets printed. For any question type, if you set a hint you don't have to provide a label.

We should print a warning when converting forms that are still using the "NO_LABEL" value, warning that the functionality is deprecated. Unfortunately, we cannot include this as part of our normal form validations since the form conversion logic replaces the "NO_LABEL" values during the convert_*_forms action. However, it should be sufficient to update the convert logic to print the warning whenever the labels are found.

Describe alternatives you've considered

We can keep things as they are and continue to be out-of-spec. Some of the downsides of this are:

  • We have to continue maintaining custom logic in cht-conf
  • Form designers have to learn bespoke syntax that is not common with other ODK implementations.
  • It limits our ability to leverage other tooling in the ODK ecosystem

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions