Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Support likert appearance #27

Closed
Tracked by #19
florianm opened this issue Feb 14, 2022 · 1 comment · Fixed by #29
Closed
Tracked by #19

Support likert appearance #27

florianm opened this issue Feb 14, 2022 · 1 comment · Fixed by #29
Assignees
Milestone

Comments

@florianm
Copy link
Contributor

likert widget https://github.com/getodk/build2xlsform/blob/master/src/convert.ls#L64

@florianm florianm added this to the 1.7 milestone Feb 14, 2022
@florianm florianm self-assigned this Feb 14, 2022
@florianm florianm mentioned this issue Feb 14, 2022
5 tasks
@florianm
Copy link
Contributor Author

florianm commented Feb 19, 2022

Status quo on latest Build/build2xlsform master - kinda works although not explicitly supported.

Build @ getodk/build@bf0f687
build2xlsform @ facbc12

A simple Build form with two metadata fields (device ID and start geopoint) plus a choose one with likert appearance.
image

Sample forms: likert.zip

  • 01 The ODK Build save file
  • 02 Export as XML (appearance "likert" - lower case)
  • 03 Export as XLSForm (appearance "Likert")
  • 04 XLSForm converted with pyxform (xls2xform 03_27-likert.xlsx) and renamed with prefix 04
Warnings:
[row : 3] Question has no label: {'name': 'start_geopoint', 'type': 'start-geopoint'}
Conversion complete!
  • 04 passes ODK Validate java -jar odkvalidate.jar 04_27-likert.xml

Loading the direct XLSForm export into ODK Central v1.3 throws a warning about the missing language code.
This issue is tracked at getodk/build#260 but could be solved here in build2xlsform.
Once the labels are corrected from label::English to label::English (en), the form uploads and renders in ODK Collect x2022.1.1 as likert widget.
It seems the "likert" appearance is case insensitive and still works as appearance="Likert" because the XLSForm is converted (by Central's pyxform) and distributed to Collect as an XForm in the case insensitive format XML.

I still want to explicitly support the likert appearance with a translation of label "Likert" to value "likert" so that in future, Build could choose to change the label.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant