getodk / build2xlsform

service to convert odkbuild-form json to xlsform-compliant xlsx.
Other
2 stars 8 forks source link

Support likert appearance #27

Closed florianm closed 2 years ago

florianm commented 2 years ago

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

florianm commented 2 years ago

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

Build @ https://github.com/getodk/build/commit/bf0f687535de7f75e78faf131e8772ec11af0a9e build2xlsform @ https://github.com/getodk/build2xlsform/commit/facbc1244b50cd94c068142434551d011ed6e41e

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

Loading the direct XLSForm export into ODK Central v1.3 throws a warning about the missing language code. This issue is tracked at https://github.com/getodk/build/issues/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.