-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathConfigure-forms.html
655 lines (576 loc) · 35.6 KB
/
Configure-forms.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<title>Configure forms</title>
<script src="libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="libs/bootstrap-3.3.5/css/flatly.min.css" rel="stylesheet" />
<script src="libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="libs/navigation-1.1/tabsets.js"></script>
<meta name="robots" content="index, follow">
<title>IFHS: Integrated Framework for Household Survey</title>
<link rel="stylesheet" href="./include/ifhs2.css" />
<script type="text/javascript" src="./libs/zeroclipboard-2.2.0/ZeroClipboard.js"></script>
<link rel="stylesheet" href="./libs/colorbox-1.6.1/colorbox.css" />
<script type="text/javascript" src="./libs/colorbox-1.6.1/jquery.colorbox-min.js"></script>
<!--- favicon --->
<link rel="apple-touch-icon" sizes="57x57" href="./images/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="./images/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="./images/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="./images/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="./images/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="./images/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="./images/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="./images/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="./images/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="./images/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="./images/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="./images/favicon/favicon-16x16.png">
<link rel="manifest" href="./images/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="./images/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
</head>
<body>
<div class="container-fluid main-container">
<nav>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Integrated Framework for Household Survey</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="design" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Design <span class="caret"></span></a>
<ul class="dropdown-menu multi-column columns-3" role="menu" id="menu_design">
<div class="row">
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Planning</li>
<li><a href="Assessment-Project-Document.html">Assessment Project Document</a></li>
<li><a href="Memorandum-of-Understanding.html">Memorandum of Understanding</a></li>
<li><a href="Terms-of-Reference-for-Assessment-Focal-Point.html">Terms of Reference for Assessment Focal Point</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Methodology</li>
<li><a href="Sampling.html">Sampling</a></li>
<li><a href="Interview.html">Interview approach</a></li>
<li><a href="Pre-Assessment.html">Pre-Assessment</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Form</li>
<li ><a href="protection-Topics.html">Protection Topics</a></li>
<li ><a href="Module-questions.html">Questions Modules</a></li>
<li ><a href="Guidelines-for-Customisation.html">Guidelines for Customisation</a></li>
</ul>
</div>
</div>
</ul>
</li>
<li class="dropdown">
<a href="collect" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Collect <span class="caret"></span></a>
<ul class="dropdown-menu multi-column columns-3" role="menu" id="menu_collect">
<div class="row">
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Preparing for fieldwork</li>
<li><a href="Configure-forms.html">Configure forms</a></li>
<li><a href="Pre-test-Phase.html">Pre-test Phase</a></li>
<li><a href="Fieldwork-Training-Agenda.html">Fieldwork Training and Agenda</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Using KoboToolBox</li>
<li ><a href="Data-Protection-Impact-Assessment.html">Data Protection Impact Assessment</a></li>
<li ><a href="Server-Configuration.html">Server Configuration</a></li>
<li ><a href="Data-Entry.html">Data Entry</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Fieldwork manual</li>
<li ><a href="Instructions-for-Interviewers.html">Instructions for Interviewers</a></li>
<li ><a href="Instructions-for-Supervisors-Editors.html">Instructions for Supervisors and Editors</a></li>
<li ><a href="Instructions-for-Managers.html">Instructions for Managers</a></li>
</ul>
</div>
</div>
</ul>
</li>
<li class="dropdown">
<a href="analyse" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Analyse <span class="caret"></span></a>
<ul class="dropdown-menu multi-column columns-3" role="menu" id="menu_analyse">
<div class="row">
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Analytics Steps</li>
<li ><a href="Clean-Anonymize.html">Clean & Anonymize</a></li>
<li ><a href="Describe.html">Describe</a></li>
<li ><a href="Discover.html">Discover</a></li>
<li ><a href="Predict.html">Predict</a></li>
<li ><a href="Advise.html">Advise</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Analysis Process</li>
<li ><a href="Data-Crunching.html">Data Crunching</a></li>
<li ><a href="Analysis-Workshop.html">Analysis Workshop</a></li>
<li ><a href="Model-for-Final-Report.html">Model for Final Report</a></li>
</ul>
</div>
<div class="col-sm-4">
<ul class="multi-column-dropdown">
<li class="dropdown-header">Communication</li>
<li><a href="Slides-Infographics.html">Slides & Infographics</a></li>
<li><a href="Microdata.html">Sharing microdata for social scientist</a></li>
<li><a href="Open-Data.html">Open Data</a></li>
</ul>
</div>
</div>
</ul>
</li>
<li><a href="Integrated-framework-household-survey.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Search">
</div>
<button type="submit" class="btn btn-default btn-sm" name="Search">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</button>
</form>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</nav>
<div class="row">
<div class="col-sm-9" role="main">
<article>
<div class="fluid-row" id="header">
<h1 class="title toc-ignore">Configure forms</h1>
</div>
<div id="TOC">
<ul>
<li><a href="#xlsform">XLSFORM</a></li>
<li><a href="#some-tips">Some tips</a><ul>
<li><a href="#manage-your-xls-form">Manage your xls form</a></li>
<li><a href="#variable-encoding">Variable Encoding</a></li>
<li><a href="#labeling-questions">Labeling questions</a></li>
<li><a href="#questionnaire-structure">Questionnaire structure</a></li>
<li><a href="#make-your-questionnaire-smart">Make your questionnaire smart</a></li>
<li><a href="#keep-your-xlsform-legible">Keep your xlsform legible</a></li>
<li><a href="#validate-deploy-the-form">Validate & Deploy the form</a></li>
</ul></li>
<li><a href="#additional-tips">Additional tips</a></li>
<li><a href="#support-forum">Support Forum</a></li>
</ul>
</div>
<div class="important">
<p> </p>
<p>Configure forms can be done both through the Kobobuilder interface or within Excel. using kobobuilder comes with Risk when the form is complex.</p>
<p>The second options is preferred as it allows for more controls.</p>
</div>
<div id="xlsform" class="section level2">
<h2>XLSFORM</h2>
<p>The form needs to be defined using the xlsform format. XLSFORM is a form standard created to help simplify the authoring of forms in Excel. Authoring is done in a human readable format using a familiar tool that almost everyone knows - Excel. XLSFORMs provide a practical standard for sharing and collaborating on authoring forms. They are simple to get started with but allow for the authoring of complex forms by someone familiar with the syntax described below.</p>
<p>The XLSFORM is then converted to an X-Form, a popular open form standard, that allows you to author a form with complex functionality like skip logic in a consistent way across a number of web and mobile data collection platforms.</p>
<p>The documentation on xlsform is <a href="http://xlsform.org/">here</a>. The same format is actually used by multiple data collection technological platform such as <a href="http://www.kobotoolbox.org/">kobotoolbox</a>(the platform used by UNHCR on <a href="http://kobo.unhcr.org">http://kobo.unhcr.org</a>), <a href="https://opendatakit.org/">OpenDataKit</a> or <a href="https://ona.io">ONA</a>.</p>
</div>
<div id="some-tips" class="section level2">
<h2>Some tips</h2>
<p>Good questionnaire design can save hours at latter stage for the person that will need to analyse the data…. do invest enough time for this step and allow for peer review before starting the <a href="s://unhcr.github.io/Integrated-framework-household-survey/Pre-test-Phase.html">testing phase</a> !!</p>
<div id="manage-your-xls-form" class="section level3">
<h3>Manage your xls form</h3>
<ul>
<li><p>Make sure your file is saved in the .xls format and contains no spaces or special characters (‘‐’ and ‘_’ are allowed).</p></li>
<li><p>Make sure that your column headers are in lowercase (i.e. “label” or “name”, not “Label” or “Name”)</p></li>
<li><p>Make sure that your sheet names are appropriately named (i.e. “survey” not “Sheet 1”, “Survey” or “surveys”)</p></li>
<li><p>Make sure that the question names are unique and do not contain spaces or special characters (‘‐’ and ‘_’ are allowed).</p></li>
<li><p>By the end of the coding sessions, there will be several versions of the MS Xls files. It is crucial to separate each according to versions and also to make sure the names do not in clude any spaces or begin with numbers or special characters.</p></li>
</ul>
</div>
<div id="variable-encoding" class="section level3">
<h3>Variable Encoding</h3>
<ul>
<li><p>The “name” column must be within 32 characters, cannot begin with a number or any special character and cannot contain any spaces in between; otherwise ODK Validate will issue an error. The longer your name is and the more time you will have to spend searching for what that specific variable or choice is in your database. Also, Kobo doesn’t accept answer choice names that contain more than 32 characters and question/ variable names no longer than 30 characters</p></li>
<li><p>Please use a short meaningfull name for your variable rather than a code like Q1 or Q2. The name should mean something to you and should be clear as to what it refers to.</p></li>
<li><p>Having a consistent and harmonised naming system throughout your survey, with descriptive/meaningful and easy to remember names for your variables/questions and choices, will allow you to quickly find the variable(s) to be modified. On the contrary, should you have a non-harmonised naming system with names that are non-descriptive, it will take you much more time than expected to find the variables of interest and to modify them.</p></li>
<li><p>In order to anticipate the analysis with a statistical package like <a href="https://unhcr.github.io/koboloadeR/docs/">koboloadeR</a>, limit variable names lenght to 12 characters and do not start a variable name with a number.</p></li>
<li><p>Avoid underscores («_») in the technical name of the variable. It can sometimes be recognised as a «separator» by certain statistical packages. Do not hesitate to rather use the «camelCase» (consists on writing a group of words in lowercase with the first letter of the lined words in uppercase).</p></li>
<li><p>Name should not contain any spaces, accentuation (“à è ô”) or special characters (“+”, “%”, “&”,“(“, “/”, etc.).</p></li>
<li><p>Names should not start with a number: You can use numbers in your names, but rather at the end or in the middle of your name so that it is instantly clearer as to what information it refers to.</p></li>
</ul>
<p>More tips on variable name encoding are available <a href="https://www.dropbox.com/s/em0s143xniqvc7j/Recommendations%20for%20the%20naming%20of%20questions%20variables%20and%20answer%20choices_EN_1802.pdf?dl=0">here</a></p>
</div>
<div id="labeling-questions" class="section level3">
<h3>Labeling questions</h3>
<ul>
<li><p>Numbering questions does not provide added value – during data entry enumerator are forced to respect the order any way. In addition, if you start numbering questions, any change in the questionnaire will then require to renumber all questions. It’s a good example of something that was important when people were using paper form but has no reason to be used anymore when moving to digital data collection.</p></li>
<li><p>Quick translation can be done with <a href="https://translate.google.com/">Google translate</a>. Obviously the resulting translation needs to be carefully reviewed but it save the time to retype the whole text and does not prevent from the <a href="https://unhcr.github.io/Integrated-framework-household-survey/Guidelines-for-Customisation.html#translation">translation review described here</a>. It’s also a good way to test the simplicity of the sentence used for the questions: if the artificial intelligence from Google translate can not decipher the questions, it means that it will be also probably difficult for the respondant. One test to confirm the question phrasing can also to translate and re-translate back in the original language in order to see if the meaning of the question is preserved.</p></li>
<li><p>When there’s a question like <em>first reason, second reason, third reason</em> or <em>first source of income, second soure of income, third source of income</em>, the bad practise is actually to have 3 separate select_one questions: aka <em>first reason</em> - then <em>second reason</em>, then <em>thirst reason</em> – First, from a cognitive point of view, respondents will have a hard time to rank among more than 5 options, second when recorded through 3 distinct variables, data will need a lot of coding to reshape the data in way where the analysis will make sense… – here the 2 options are either:</p>
<ul>
<li><p>select_multiple with a constraint count on the number of modality you can select “<code>not(count-selected(.) < 4</code>” — often it’s simpler as very likely the ranking between options will be difficult to analyse</p></li>
<li><p>or go for a rating <a href="https://unhcr.github.io/Integrated-framework-household-survey/Module-questions.html#question-design">likert</a> questions for each options – and then the ranking will be performed during the analysis through the sum of the rates for each respondent.</p></li>
</ul></li>
</ul>
</div>
<div id="questionnaire-structure" class="section level3">
<h3>Questionnaire structure</h3>
<ul>
<li><p>All “begin group” types must have a corresponding “end group”. It is advised to name each of the begin group and end group “name” as well as “label” columns for easy identification of where a group starts and ends, e.g. "type– begingroup. Name – grp_agri_aman. Label – Aman Rice. T ype – end group. Name – endgrp_agri_aman. Label – no labels are required as this won’t show up in the form.</p></li>
<li><p>There can be a mother group with several child groups within, however each group essentially works like brackets which open, can remain open, close or close at the end. It can get rather complicated once several questions within a group are to be skipped.</p></li>
<li><p>DO NOT LEAVE A SPACE AFTER your “type” or “name” variables, e.g. “end group”. It is an invisible error that will cause the form to malfunction.</p></li>
<li><p>It is a good practice to keep naming the questions “label” as “Name of Household Head… Age of Respondent…Please specify what you mean by”Other“…and so on”. The same can be done for “name” variables but one must remember that they cannot start with an uppercase letter, e.g. “name_hhh” is allowed.</p></li>
</ul>
</div>
<div id="make-your-questionnaire-smart" class="section level3">
<h3>Make your questionnaire smart</h3>
<ul>
<li>Use hints as much as possible - a good example is to recall to your enumerator how to proceed with select question for instance two options are possible :
<ul>
<li>Read the list and select all (or only the right) answers</li>
<li>Do not read the list - wait for the answer to select the right answer(s)</li>
</ul></li>
<li><p>The “note” and “calculate” type of questions can be really handy and must be used whenever there is a reason to check back with data entered previously. E.g. “type – calculate, name – calc_loan, calculation - ${loan_1}+{loan_2}+{loan_3}” with "type – note, name – chk_total_loan , label – Your breakdown of total loans ${loan_1} and ${loan_2} and ${loan_3} add up to ${calc_loan}. Please make sure they are equal to the amount entered before as total loan ${totalloan}.</p></li>
<li><p>Systematically add constraint to your numeric questions: age can not be negative or bigger than 120. Add also constraint on linked values: for instance if you know the number of children in a family, the number of boys can not be bigger than the total number of children. Do not forget to add <strong>constraint_message</strong> to help your enumerator to fix the issue!</p></li>
<li><p>When you do a calculation, <strong>beware of zero</strong> : To convert empty values to zero, use either the coalesce() function or the if() function. See the form logic functions reference below. "+ ‐ *" correspond to add, subtract, and multiply. Division however, is special, and you need to use the word “div” to do division.</p></li>
<li><p>The best types of constraint and relevance are usually the simplest. When typing the binding guidelines (<a href="http://opendatakit.org/help/form" class="uri">http://opendatakit.org/help/form</a> - design/binding/) can simplify the entire line of code. Also this is the most interesting and perhaps challenging part of writing questionnaires. Users are free to develop their own lines of code and put them to the test. For any help the Google ODK groups are more than sufficient.</p></li>
<li><p>If the questions need to be translated into a local language, the input must be in <strong>Unicode</strong>. Also it is imperative to make sure that questions in the base language are translated with the meaning intact. Difference in interpretation can cause severe errors in the quality of the data.</p></li>
<li><p>Systematically add the metadata field: type: ‘start’, ‘end’, ‘today’, ‘deviceid’, ‘imei’, ‘phonenumber’</p></li>
<li><p>To record <strong>admin level</strong>, use <a href="http://xlsform.org/en/#cascading-selects">cascading drop down lists</a>. Note that this does not work well whem more than 500 options. In this case, one option is to use select_external : <a href="http://xlsform.org/en/#external-selects" class="uri">http://xlsform.org/en/#external-selects</a> but this will work only if data collection is done with Android client (not the web client).</p></li>
<li>Record correctly registration case number using a regex constraint where caret is the <a href="https://en.wikipedia.org/wiki/Caret">ASCII special character</a>:
<ul>
<li>for case number: “<code>regex(.,‘caret[0-9]{3}-[0-9]{2}[C][0-9]{5}$’) </code>”</li>
<li>and for Individual number “<code>regex(.,‘caret[0-9]{3}-[0-9]{2}[I][0-9]{5}$’)</code>”</li>
</ul></li>
<li><p>Record case number using bar code scanner whenever possible - rather than manual data entry.</p></li>
<li><p>Add constraint on email validation through the same regex: “<code>regex(., ‘[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,4}’)</code>”. This can be more specific if a specific email domain is expected.</p></li>
<li><p>Calculate years from date (age from date of birth) “<code>round((decimal-date-time(<span class="math inline"><em>t</em><em>o</em><em>d</em><em>a</em><em>y</em>) − <em>d</em><em>e</em><em>c</em><em>i</em><em>m</em><em>a</em><em>l</em> − <em>d</em><em>a</em><em>t</em><em>e</em> − <em>t</em><em>i</em><em>m</em><em>e</em>(</span>{dob})) div 365.24, 0)</code>”.</p></li>
<li><p>Validate past date (constraint) “<code>decimal-date-time(.)<decimal-date-time(${today})</code>”.</p></li>
<li><p>Use “or_other” whenever you have a select_one or select_multiple questions that may have additional modalities that you can not anticipate</p></li>
<li><p>If you have a select_multiple question with one modalites being “None of the options mentionned here”, use a contraint to ensure that respondant will not select this options with other: “<code>not(count-selected(.) > 1 and selected(., ‘no’))</code>”</p></li>
<li><p>Review the <strong>appearance</strong> <a href="http://xlsform.org/en/#appearance">options</a> : Beware some options (like ) are only for web client while other (like “quick”) are only for the android client.</p></li>
</ul>
</div>
<div id="keep-your-xlsform-legible" class="section level3">
<h3>Keep your xlsform legible</h3>
<ul>
<li><p>It is possible to separate different sections of the questionnaire using different cell colours. It does not make a difference for ODK, but makes the form much more navigable.</p></li>
<li><p>In the same idea, in Excel, freeze the top row cell and add automatic filters to quickly navigate through your questions (survey) and answers (choices).</p></li>
<li><p>In the choices sheet, a gap or (blank row) can be left after each set of answers. Again, it doe s not make a difference for ODK but makes it much easier for navigation.</p></li>
</ul>
</div>
<div id="validate-deploy-the-form" class="section level3">
<h3>Validate & Deploy the form</h3>
<ul>
<li><p>kobotoolbox has some built-in <strong>validation check & debugging check</strong> when a xlsform is uploaded. Sometimes better validation / debugging support can be obtained by other online validator such as <a href="https://opendatakit.org/xlsform/">https://opendatakit.org/xlsform/</a></p></li>
<li><p>For review purpose, you may find usefull to have a beautifull transcript in word of your xlsfrom using <a href="http://ppp.pma2020.org/">PPP for Open Data Kit</a></p></li>
<li><p>Note for field deployment: if possible, users must try and keep a copy/image of the entire " ODK " folder inside the memory of the tablet and save it elsewhere for later reference. If planning requires users to clear out " ODK " and re insert a questionnaire for easy tracking, then this step becomes very a vital safe guard.</p></li>
<li><p>one point is also that as for dataviz, good questionnaire are the result of multiple persons looking at it – hence the importance of peer review – peer review is different from testing - it requires people with expertise in questionnaire design to review - this is among the support than can be requestioned from regional offices.</p></li>
</ul>
</div>
</div>
<div id="additional-tips" class="section level2">
<h2>Additional tips</h2>
<p>Additional tutorials and tips can be found through the following links:</p>
<ul>
<li><p><a href="https://docs.opendatakit.org/form-logic/">Open data kit Form Logic</a></p></li>
<li><p><a href="https://docs.opendatakit.org/form-operators-functions/">Open data kit Form operator functions</a></p></li>
<li><p><a href="https://opendatakit.org/help/form-design/">Open data kit Form design guides</a></p></li>
<li><p><a href="https://opendatakit.org/help/form-design/workarounds/">Open data kit work around</a></p></li>
<li><p><a href="https://opendatakit.org/help/training-guides/">Other training guides</a></p></li>
<li><p><a href="https://www.mdc-toolkit.org/design-your-forms/">Tips from the Mobile Data Collection Toolkit</a></p></li>
<li><p><a href="http://blog.cartong.org/2015/08/11/advanced-xls-forms-coding-1/">Advanced XLSFORM coding tips #1</a></p></li>
<li><p><a href="http://blog.cartong.org/2015/08/21/advanced-xls-forms-coding-2/">Advanced XLSFORM coding tips #2</a></p></li>
<li><p><a href="https://odk.acf-e.org/odk/LinkedDocuments/Annex%204%20ODK%20ACF-E%20How%20to%20author%20surveys%20for%20ODK.pdf">ACF XLSFORM coding tips</a></p></li>
</ul>
</div>
<div id="support-forum" class="section level2">
<h2>Support Forum</h2>
<p>When faced with specific challenges, multiple online forums can be consulted (as xlsform is used on different platform):</p>
<ul>
<li><p><a href="http://support.kobotoolbox.org/">Forum for Kobotoolbox</a></p></li>
<li><p><a href="https://forum.opendatakit.org/">Forum for OpenDataKit</a></p></li>
</ul>
</div>
</article>
</div>
<div class="col-sm-3" role="complementary">
<nav class="hidden-print hidden-xs" id="nav_sidebar">
</nav>
</div>
</div>
<script>
// manage active state of menu based on current page
$(document).ready(function () {
// active menu
href = window.location.pathname;
href = href.substr(href.lastIndexOf('/') + 1);
if (href=='') href = 'index.html';
$('a[href="' + href + '"]').parent().addClass('active');
$('a[href="' + href + '"]').parent().parents('li').addClass('active');
// élargir la page d'accueil
if (href=='index.html') $('.col-sm-9').attr('class','col-sm-12');
// rechercher
$("#rechercher").submit(function(event) {
$('input[name="q"]').val($('input[name="q"]').val() + ' site:unhcr.github.io/Integrated-framework-household-survey');
});
// sidebar
$("#nav_sidebar").append($("#TOC").html());
$("#nav_sidebar ul").addClass("nav nav-stacked");
$("#TOC").addClass("visible-xs-block");
$('body').scrollspy({
target: '#nav_sidebar',
offset: 40
});
// Identifier les <pre> fermant
$('pre').next("*:not(pre)").prev().addClass('last'); // Dernier <pre> de chaque groupe contigu de <pre>
$('pre').parent().each(function (){
$(this).children('pre').last().addClass('last');
}); // Si <pre> est le dernier enfant de son parent
// Ajout liens rdocumentation et tooltip
$("code[data-pkg]").each(function( index ) {
pkg = $(this).attr('data-pkg');
if ($(this).attr('data-rdoc') !== undefined) {
rdocumentation = $(this).attr('data-rdoc');
} else {
rdocumentation = $(this).text();
}
fonction = $(this).text();
$(this).wrap('<a href="http://www.rdocumentation.org/packages/'+pkg+'/functions/'+rdocumentation+'">');
$(this).attr('data-toggle','tooltip');
$(this).attr('data-placement','top');
$(this).attr('title','package : ' + pkg);
$('[data-toggle="tooltip"]').tooltip();
});
$("code.pkg").each(function( index ) {
$(this).wrap('<a href="http://www.rdocumentation.org/packages/'+$(this).text()+'">');
});
// Figures
$("figure").each(function( index ) {
if ($(this).children("figcaption").length > 0)
$(this).children("figcaption:first").prepend('<span class="figure-number">Figure '+(index+1)+'.</span> ');
else
$(this).append($("<figcaption>").append('<span class="figure-number">Figure '+(index+1)+'</span>'));
});
// Colorbox
jQuery('article div img').colorbox({
maxWidth: '90%',
maxHeight: '90%',
rel: 'figures',
current: "",
href: function(){
return $(this).attr('src');
},
title: function(){
return $(this).attr('alt');
}
});
jQuery('article div img').css('cursor', 'pointer');
jQuery('figure img').colorbox({
maxWidth: '90%',
maxHeight: '90%',
rel: 'figures',
current: "",
href: function(){
return $(this).attr('src');
},
title: function(){
return $(this).parent().children("figcaption").text();
}
});
jQuery('figure img').css('cursor', 'pointer');
// ZeroClipboard
$('pre.r').parent().each(function(){
$(this).children('pre.r').first().before('<div class="zero-clipboard hidden-print hidden-xs"><button class="btn-clipboard">Copy</button></div>');
}); // Il peut arriver que le pre ne soit pas précédé (cf. figures)
$('*:not(pre):not(.zero-clipboard) + pre.r').before('<div class="zero-clipboard hidden-print hidden-xs"><button class="btn-clipboard">Copy</button></div>');
$('pre.last').after(function() {
if ($(this).hasClass("r")) res = $(this).text(); else res = "";
$(this).prevUntil('*:not(pre)','pre.r').each(function() {
res = $(this).text() + '\n' + res;
});
return '<div class="clipboard">' + res + '</div>';
});
$('.zero-clipboard').each(function(index){
$(this).children('.btn-clipboard').attr('data-clipboard-target','clipboard_'+index);
$(this).nextAll("div.clipboard").first().attr('id','clipboard_'+index);
});
var client = new ZeroClipboard( $(".btn-clipboard") );
client.on( "ready", function( readyEvent ) {
// alert( "ZeroClipboard SWF is ready!" );
client.on( "aftercopy", function( event ) {
// `this` === `client`
// `event.target` === the element that was clicked
//event.target.style.display = "none";
$(event.target).parent().before('<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a>The <strong>R</strong> code is now copied in your clipboard.</div>');
} );
} );
});
</script>
<!-- disqus -->
<div class="row">
<div id="disqus_thread" class="col-sm-9" role="complementary"></div>
</div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'Integrated-framework-household-survey'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Activate JavaScript to see <a href="http://disqus.com/?ref_noscript">Disqus Comments.</a></noscript>
<!--<a href="http://disqus.com" class="dsq-brlink">Comments are hosted by <span class="logo-disqus">Disqus</span>.</a>-->
<footer>
<div class="row">
<div class="col-lg-12">
<p>Powered by <a href="http://www.r-project.org/" rel="nofollow">R</a>, </a><a href="http://www.rstudio.com/" rel="nofollow">RStudio</a>, <a href="http://rmarkdown.rstudio.com/" rel="nofollow">R Markdown</a>, <a href="http://yihui.name/knitr/" rel="nofollow">knitr</a>, <a href="http://pandoc.org/" rel="nofollow">pandoc</a> and <a href="http://www.princexml.com/" rel="nofollow">Prince XML</a>. Hosted by <a href="https://github.com/" rel="nofollow">GitHub</a>.</p>
</div>
</div>
</footer>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
});
});
</script>
<!-- code folding -->
</body>
</html>