Skip to content

Do not warn when converting form that has choices with images but no labels #9

Description

@jkuester

The new enketo supports the no-buttons appearance which allows for select fields for choices that have images, but no labels. (See the grid_test and grid_2_columns fields on the Enketo Widgets Demo Form for an example of what this looks like.) Annoyingly, pyxform will log a warning about any choice that does not have a label. It would be nice to see if we could find a way around this warning, perhaps by leveraging the NO_LABEL functionality that already exists.

Currently using NO_LABEL does not work since our existing patch in pyxform for NO_LABEL seems to break the functionality of keeping the image label with no text.... Currently, if you do not include any text in the label, a warning is printed and, in the itext section of the generated XML, the expected text elements are included for the images. E.g.:

          <text id="static_instance-happy_sad-0">
            <value form="image">jr://images/happy.png</value>
          </text>

But, if you put NO_LABEL as the label, these text elements are not created at all....

Context: XLSForm#610

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions