Form design: grid of text or numeric input

odk-collect
form-design

(Dr. Gareth S. Bestor) #21

You could populate a text label containing the title for each row, eg from an item list (take a look at my earlier link)

Scrollbar? Swipe? (latter would require disabling swiping performing 'next control' obviously)


(David Kaftan) #22

I like this idea, no need to constrain our grids to "repeating" questions.

And then handle not duplicating the labels (when it s a repeat group), much the same we done presently with select repeat groups; ie an appearance tag to say hide labels.

why did you cross this out? it seems like a reasonable solution.


(Dr. Gareth S. Bestor) #23

As noted by @LN

which seems to be the prevailing workaround for constructing a select table/grid. Basically, the first 'row' is a faux select/select1 with a "label" appearance, simply in order to display show the column headings. Then you'd put all the real select questions in a repeat group, with a list-nolabel. And you then put the whole contraption in a field-list group so it all gets displayed together. Its a bit of a kludge (IMO) because you're adding an entirely redundant select control into your form simply for the purpose of displaying the column headings. But hey, it gets the job done!

However, on reflection (hence redaction) I dont believe this approach is particularly scalable nor the best approach for displaying the column headings for a generic (group-based) grid. It would basically mean duplicating the entire group and all its controls (!) once at the beginning (using "label" appearances or equivalent) for the column headings, and then again within the subsequent real repeat group (w/ "nolabel").

Since we're proposing having to introduce a new group appearance anyway (ie "table") then I think it might be preferable to simply exploit this; by definition a "table" appearance would imply "field-list" (ie the group/repeat group should be shown on the same page), and when rendering a repeat group having a "table" appearance, only show the enclosed controls' labels if position(..) index = 1. This would relieve the form writer from having to worry about how to display the column headings, which they must presently do with the select table workaround.

[aside: we might even look at whether this more general design could be used to better define a select table: ie a repeat group w/ appearance="table", containing a single select/select1 question, and similarly only display the select's option labels if position(..) index = 1?]