getodk / build2xlsform

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

Numeric slider range parameters start, end, step should be numeric, not string #20

Closed florianm closed 2 years ago

florianm commented 2 years ago

A numeric field with a slider will let a user type in the numeric min, max, and step width: image Note the values are numeric.

In the exported XForm, this becomes a <range ref="/data/group1/slider" start="0" end="8" step="1">. Note the values are quoted strings. The XForm however uploads and works fine.

In the exported XLSForm, this becomes a parameter with value start="0" end="8" step="1". Note the values are quoted strings - this is in contrast to the XLSForm spec showing numeric values for start, end, step. build2xlsform probably did nothing wrong(er) here. The XLSForm raises an error in ODK Central: image

Manually changing the XLSForm parameter to start=0 end=8 step=1 fixes the ODK Central error.

How much of an issue is this for Build users? Question for user analytics: How many users go from Build to XLSForm (are we logging this?) and trip over sliders (are we logging form import warnings)?

florianm commented 2 years ago

This is an issue for build2xlsform. Numeric values must be quoted in XML IIRC, so Build does it right. Edit: included in #19

florianm commented 2 years ago

Likely place to start: https://github.com/getodk/build2xlsform/blob/master/src/convert.ls#L223