A | B | C | D | E | F | G | I | J | K | L | M | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | type | name | label | hint | appearance | choice_filter | constraint | constraint-msg | default | readonly | relevant | required |
2 | note | rule1 | This form provides guidance on how to optimize forms that use the “Grid” theme using appearance _w1, w2, …. w10_. 1. A question w-value is relative to the w-value of its group. A group of w4 can contain a maximum of 4 questions of w1 on one row. 2. The __default width__ of a group or repeat is __4 columns__ (w4). 3. A row will automatically __always__ be stretched to the full width of the page. 4. __Only apply w-values to top-level groups or repeats__, not to nested groups and repeats. The latter is supported, but will probably never look good. 5. Put all questions in groups to avoid layout issues when printing your forms The XLS original is available [here](https://docs.google.com/spreadsheet/ccc?key=0Al3Mw5sknZoPdDhSVmhJX2NvOG44X1RadTA2RVRzSHc&usp=sharing). | |||||||||
3 | ||||||||||||
4 | begin_group | ex1 | One simple row with 4 equal-sized questions cells (default group width = w4) | |||||||||
5 | text | ex1_1 | Enter some text | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
6 | integer | ex1_2 | Enter a number | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
7 | decimal | ex1_3 | Enter a decimal number | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
8 | date | ex1_4 | Enter a date | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
9 | end_group | |||||||||||
10 | ||||||||||||
11 | begin_group | ex2 | One simple row with 2 small questions and 1 larger (default group width = w4) | true | ||||||||
12 | text | ex2_1 | Enter some text | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
13 | integer | ex2_2 | Enter a number | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
14 | text | ex2_3 | Enter a bit more text | This question should be 2 columns wide so it gets appearance: w2 | w2 | |||||||
15 | end_group | |||||||||||
16 | ||||||||||||
17 | begin_group | ex3 | One simple row with 7 columns (group width = w7) | w7 | true | |||||||
18 | text | ex3_1 | Enter some text | This question should be 2 columns wide so it gets appearance: w2 | w2 | true | ||||||
19 | integer | ex3_2 | Enter a number | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
20 | text | ex3_3 | Enter a bit more text | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
21 | integer | ex4_4 | Enter a number | This question should be 3 columns wide so it gets appearance: w3 | w3 | true | ||||||
22 | end_group | |||||||||||
23 | ||||||||||||
24 | begin_group | ex4_4 | Combining appearance attributes (group width = w3) | w3 | ||||||||
25 | select_one list2 | ex4_1 | Choose one | To take up 2 columns we need appearance=w2, to display the choices horizontally we need appearance=horizontal. So we add both: "w2 horizontal" or "horizontal w2" | w2 horizontal | true | ||||||
26 | integer | ex4_4 | Enter a number | This question should be 1 column wide so it gets appearance: w1 | w1 | true | ||||||
27 | end_group | |||||||||||
28 | ||||||||||||
29 | begin_group | ex5 | Multiple rows... all done automatically (group width = w4) | This group has 4 columns so we don't need to give it an appearance attribute | w4 | |||||||
30 | note | ex5_1 | If a question doesn't fit it will be placed on the next row. | This note should be full width so it gets appearance: w4 | w4 | |||||||
31 | text | ex5_2 | Enter some text | This question should be 2 columns wide so it gets appearance: w2 | w2 | |||||||
32 | integer | ex5_3 | Enter a number | This question should be 2 columns wide so it gets appearance: w2 | w2 | |||||||
33 | text | ex5_4 | Enter more text | This question should be 3 columns wide so it gets appearance: w3 | w3 | |||||||
34 | integer | ex5_5 | Enter a number | This question should be 1 column wide so it gets appearance: w1 | w1 | |||||||
35 | end_group | |||||||||||
36 | ||||||||||||
37 | begin_group | ex6 | Advanced grid behaviour: Stretching rows to full width. Always. | This group has 4 columns so we don't need to give it a appearance attribute | w4 | |||||||
38 | note | ex6_1 | This behaviour makes sure forms almost always look good, even if the w-values aren't completely adding up. | This note is full width even though it has appearance: w3, because the next question won't fit on the same row AND a row is always displayed full width. | w3 | |||||||
39 | text | ex6_2 | Enter some text | This question has appearance: w2, but it is larger than 50% because of the next 2 questions with appearance: w1 and w3. Only the first question fits on the same row AND a row is always displayed full width. | w2 | |||||||
40 | integer | ex6_3 | Enter a number | This question has appearance: w1, but is larger than 25%.... | w1 | |||||||
41 | text | ex6_4 | Enter more text | This question should be 3 columns wide so it gets appearance: w3 | w3 | |||||||
42 | integer | ex6_5 | Enter a number | This question should be 1 column wide so it gets appearance: w1 | w1 | |||||||
43 | end_group | |||||||||||
44 | ||||||||||||
45 | begin_group | ex7 | Planning for questions with skip logic | This group has 4 columns so we don't need to give it a appearance attribute | w4 | |||||||
46 | note | ex7_1 | __If you understand this example you have become an Enketo Grid Pro and are ready to start building gridified forms!__ | This note should be full width | w4 | |||||||
47 | select_one yes_no | ex7_2 | Select yes, to reveal next question | We want this question to be on the row together with the next question when it is revealed (appearance=w2) | w2 horizontal | |||||||
48 | integer | ex7_3 | Enter a number | This question has appearance: w2, so it fits together with the previous question on one row when revealed. | w2 | ${ex7_2} = 'yes' | ||||||
49 | text | ex7_4 | Enter more text | Important! If you want this question to always appear on a new line, it's size (w3) should not fit on the previous row even if the question is hidden. | w3 | |||||||
50 | integer | ex7_5 | Enter a number | This question should be 1 column wide so it gets appearance: w1 | w1 | |||||||
51 | end_group |