I have been working with layout-based-forms quite a bit and there is something that I did not realize until somewhat recently.
To get the labels and datafields to “look right” (not wrapped to next line, seemingly randomly scattered), I have started doing the following:
-
In the “Layout properties” dialog, pick a number of columns (“Layout Columns”) (say 3 for three labels and data fields maximum per row).
-
Then, in the first field of each row, choose a number of fields and labels that will be in that particular row (say 1 and 1, 2 and 2, or 3 and 3) and put these two numbers, respectively, into the Label Cols and Data Cols field of that row (make the two numbers the same).
-
Then, in the second, third, etc fields, just use 0 and 0, respectively for the Label and Data Cols fields. This will cause each row to have the expected number of rows with the expected number of datafield labels and datafield entry boxes.
-
Repeat for subsequent rows (the first field will always have a Label Cols and Data Cols that are the same and represent the number of labels and datafields in that row.
Thus, setting a Layout Properties like this …
With a layout configuration like this …
Will look something like this in the visit form:
I cannot think of a reason to have the Label Cols and Data Cols to be a different number with the above scheme.
Hope this helps someone like me.
–Ralf