Closed jkuester closed 2 years ago
Could you please add where the example widgets form is linked from? I can't seem to find it on the xlsforms docs, reference table, or xforms-spec pages.
The xlsforms docs page states that the label column is mandatory in the choices worksheet:
The choices worksheet has 3 mandatory columns as well: list name, name, and label.
- The list name column lets you group together a set of related answer choices, i.e., answer choices that should appear together under a question.
- The name column specifies the unique variable name for that answer choice.
- The label column shows the answer choice exactly as you want it to appear on the form. Alternatively, label translation columns can be used.
However users may ignore warnings if they're sure that the form design is as desired.
If possible please add more info about your use case, particularly if the warning has started showing when it did not before.
@lindsay-stevens Thanks for the response here! After looking at this some more, I am thinking that this is just an Enekto "feature" that is technically out-of-spec (thanks for your link regarding what is required in the choices worksheet!).
For the record, I cannot remember exactly where I first ran across the link to that example widgets form. But, it is a pretty commonly referenced example form in Enekto discussions.
An interesting counter-example is the bird watching form referenced by the xlsform media docs. That form contains a bunch of images in the choices sheet, but they all also have a label (which is then also displayed in the generated form). There is no example of a choice without a label.
Closing this since there does not seem to be any reason to expect pyxform to support behavior that is out-of-spec....
It is indeed acceptable to use an image in place of a label for either questions or choices. I think keeping the warning for that case is fine, though, because pyxform
has no idea what the intent is.
The no-buttons appearance is intended to build grids of images and is generally used without labels. But pyxform
generally passes through appearances and does no additional checks based on it so even then I think keeping the warning and avoiding too many special cases is fine.
The original All Widgets form is maintained here and linked to from the Collect repo and the ODK docs. It could also be linked from the XLSForm doc.
Huh, there's an Enketo bug (or maybe a form design bug?) -- the no-buttons
appearance is supposed to not display buttons which it does for the second case in the screenshot but not the first.
Software and hardware versions
pyxform v1.10.0, Python 3.8.10
Problem description
When converting a form that has options specified on the "choices" sheet that have a value for
image
but not forlabel
, I see a warning:This happens when following the pattern from the example Enekto Widgets form where you can have a select question where the user picks based on images and there are no labels:
Steps to reproduce the problem
xls2xform
Expected behavior
If the option has an
image
value, I would not expect to see a warning when there is nolabel
value.