300+ character label in Collect

Using Collect v1.14 and XLSForm

Just noticed a bug arising from a non-standard use of label (XLS survey sheet).

I inserted a 300+ character label name. It was a select_multiple question, set to required with a required_message and with a constraint operator and constraint_message.

This generates the Edit Prompt - Remove Response message to be displayed, alongside the required and/or constraint message.

Example XLS attached.
Excess_label_characters.xlsx (13.1 KB)

P.S. I've worked around this by transferring the 300+ characters to the hint field and shortening the label name.

P.P.S. Validation warnings are being generated when adding customised read_message

ODK Validate Warnings: XForm Parse Warning: Warning: 1 Unrecognized attributes found in Element [bind] and will be ignored: [requiredMsg] Location: Problem found at nodeset: /html/head/model/bind With element Problem found at nodeset: /html/head/model/bind With element

Hi @panthonyl

thanks for reporting your problem. In Collect we allow to display a question name with max 50 chars in that dialog. @yanokwa it's you part of code and it was added 8 year ago, do you remember why? https://github.com/opendatakit/collect/blob/master/collect_app/src/main/java/org/odk/collect/android/activities/FormEntryActivity.java#L2010

When it comes to the warning about requiredMsg it's only a warning and it has been fixed in the Javarosa's side so it will be fixed in Validate too one we release a newer version (In fact it's updated https://github.com/opendatakit/validate/releases/tag/v1.9.0 but probably the online tool doesn't use the newest version yet)

Thanks @Grzesiek2010 for explanation and update.

By way of my explanation I used a long form Label description as Label uses a bold font and therefore is more prominent/legible to the interviewer than the italicised, standard weight Hint font.

Not a crucial difference, hence I used Hint instead, but nice if it was permissible.

No doubt there is a way of customising the typeface but I was being lazy/efficient trying to cram my description into Label rather than getting up to speed with another way of tweaking the questionnaire on the device. At least now I'm aware of the actual character limit for Label.

@Grzesiek2010 The truncation feature was likely there to make the dialog smaller. One quick way to resolve it is to make the dialog text scrollable. I've filed an issue at https://github.com/opendatakit/collect/issues/2149 so we can discuss if it's a good idea or not.

@panthonyl There are lots of ways to style. http://xlsform.org/#styling has a good summary and we are in the process of adding more examples to the ODK docs. You can follow that effort at https://github.com/opendatakit/docs/pull/658/files.

@yanokwa Thanks for the links. Very useful.