ODK Collect text entry options? Limited by single-line design

I use ODK Collect to populate complex natural resource management plans. It's mostly awesome for this, except that text entry fields are displayed on one line only, so that if I enter multiple sentences within a field, and if I want to add or edit something later, I have to scroll awkwardly. The app and ODK Build form designer do not seem to provide alternative options for text entry fields, like basic bounded boxes which show all entered text without having to scroll horizontally. I appreciate that I can change some types of fields, for instance so that I can display multiple choice entries with a minimal spinner, or numeric data on a slider. Am I missing something or are alternatives simply not designed into the app or form creator?
Thank you!

1 Like

In ODK Collect the field should expand vertically. For an Enketo web form, you can set appearance as multiline to create a larger text entry field.

Welcome to the ODK forum, @MorenoForestry ! We're glad you're here. When you get a chance, please introduce yourself on this forum thread. Thank you for adding a picture as your avatar already because it helps build community!

Hi @MorenoForestry, thanks for sharing this feature request.
I've taken a note to evaluate whether this can be added to ODK Build.

Thanks everyone! I will wait for future options like the 2nd picture in danbjoseph's post, but until then I'll be happy with the single line expanding as enough text is added to trigger it to expand.

1 Like

Do you need to scroll horizontally or did you just think you might need to? If you do, it would be helpful to know what Android version you're on and what version of Collect you use.

No issue with adding to Build -- Collect will ignore it currently.

Collect could use the multiline appearance and show a "text area" which starts out taller. The nice thing about that is that it may visually encourage a longer response. The disadvantage is that it would not expand vertically as @danbjoseph shows in his screenshot. Instead a user would have to scroll vertically to see any text that goes beyond the text area's height. See Material docs for more. @MorenoForestry would that be desirable for you?

1 Like

I was recently reminded of the rows body attribute which is documented in the ODK XForms spec but not anywhere else as far as I know. @sglasby's introduction reminded me of it (if you'd like follow-up on any of the topics you brought up, please start new threads or add to existing ones).

Using it in XLSForm involves adding a body::rows column. This sample form shows an example.

Given that text boxes expand vertically, I'd be interested in knowing more about what the underlying need is. Is it that respondents don't write as much when presented with a short field?

@LN has put rows support in the tracker for XLSForm: https://github.com/XLSForm/pyxform/issues/616 in case anyone would like to follow / contribute :+1:

1 Like