How to design a basic e-form

  • Unlike paper questionnaires which contain and display all contents on 1 page, for the mobile devices or web browser to display the e-form correctly, 1 xlsform needs 3 mandatory components contained in 3 different Excel sheets, namely survey, choices, and settings.
  • For a start, an xlsform designer should start from a blank Excel file, or start from the template (BASIC_XLSFORM_TEMPLATE.xlsx) to save time, containing the above 3 sheets:

survey

  • Contains all questions together with hints or instructions.
  • To handle this sheet, the form designer must understand the meaning of the following 4 columns:

type

Meaning This column defines which type of data are allowed to be captured.
Value
Importance Mandatory
Example
  • select_one list1
  • select_multiple list2
  • integer
  • decimal
  • text
  • note

name

Meaning This is unique ID of the 1 question in the questionnaire.
Value
  • Only A-Za-z0-9 or underscore (_)
  • name cannot begin with a numeric character.
  • The length of name should be from 2 to 15 characters.
Importance Mandatory
Example
  • wb_s2_q17
  • adb1002
  • staff_code
  • gender
  • _idnumber

label

Meaning
  • This is main content of the question.
  • Respondents will see these values only when filling form.
  • To make multi-language label, see Xlsform - Multi-language to know more.
Value User friendly text
Importance Mandatory
Example
  • Your full name:
  • What is your birth date?
  • Please fill in the blank!

hint

Meaning
  • hint contains instructions and suggestions.
  • It guides the surveyor to ask respondents in correct manner.
  • hint also instructs how to capture correct data requested.
  • hint is usually italicized and displayed below the question.
  • hint is sometimes put in the () or [] right after the question.
  • To make multi-language hint, see Xlsform - Multi-language to know more.
Value User friendly text
Importance Optional
Example
  • (in days)
  • select all that apply
  • [Interviewer do not read out loud the options]
  • Here is an example of sheet survey in an actual basic xlsform:

    xlsform-survey-01a-sheet-basic

See also

If you want to design a more complicated form (including skipping, beautiful appearance, value range limitation, … please read How to design an intermediate xlsform or How to design an advanced xlsform.

choices

  • Contains all answer options of multiple-choice questions.
  • To handle this sheet, the form designer must understand the meaning of the following columns:

list_name

   
Value Only A-Za-z0-9 and underscore (_)
Meaning Choice options of the same question will have the same list_name
Good practice list_name should be in lower case, no longer than 15 characters

name

   
Value Only A-Za-z0-9 and hyphen (-), underscore (_), or dot (.)
Meaning This is unique ID of the choice option of 1 list_name
Good practice name should be in numeric, then the later data process will be easier when if you would like to analyze data with tools such as SPSS, EVIEWS, STATA, or R, python

label

   
Value User friendly text
Meaning This is front-end of the choice list, which means when respondents fill in the form, they will see the values of this column
Good practice In case you need a multi-language form, you can add more columns with suffix ::language like label::vi, label::en, label::fr
  • Here is an example of sheet choices in an actual project:

    xlsform-choices-01a-sheet-basic

  • Here is the layout of the xlsform survey and choices in mobile screen:

    xlsform-survey-02a-ui-basic

See also

If you want to design a more complicated form (including “multimedia”, “dynamic” or “nested” choice list, please read How to design an intermediate xlsform xlsform-intermediate-designing_ or How to design an advanced xlsform xlsform-advanced-designing_.

settings

  • Contains questionnaire name and version.
  • To handle this sheet, the form designer must bear in mind the following important collumns:

form_title

   
Value User friendly text
Example [RSV] ĐĂNG KÝ PHÒNG HỌP (1 - 1812271635)
Meaning The title of the form, which will be displayed in the form list in Fill form section
Good practice [AAA] short title (xx - yyyyyyyyyy) where AAA is 3-digit-prefix of Project, xx is form generation and yyyyyyyyyy is form version

form_id

   
Value Only A-Za-z0-9 and underscore (_)
Example RSV_MEETING_ROOM_G1
Meaning Unique ID of the form, which will be used to distinguish between different forms
Good practice AAA_SHORT_NAME_Gxx where all the letters are in upper case, AAA means the 3-digit-prefix of Project and xx is form generation

instance_name

   
Value No special characters or punctuations, can be static or dynamic (referring to other fields in form)
Example RSV - Meeting Room
Meaning This is used to distinguish between different instances submitted from 1 form
Good practice This field should include 3-digit-prefix of Project, name of form filler, location, and datetime of form submitted

version

   
Value Numbers only
Example 1812271635
Meaning This number indicating that the current form has been changed lightly, compared with the older. The changes can be from question labels, hints, or appearance without changing the structure of the questionnaire
Good practice yymmddHHMM where yy is 2-digit year number, mm is 2-digit month number, dd is 2-digit day number, HH is 2-digit hour number and MM is 2-digit minute number

generation

   
Value Numeric value in ascending order (starting from 1)
Example 2
Meaning This number indicating that the current form has been changed largely, compared with the older. The changes can be adding/obmitting questions, or choice options
Good practice When the form generation is 20 and about to increase, a new family should be created then the generation of new family will start from 1 to reduce the heavy burden of outdated forms when dealing with the whole family

family

   
Value Only A-Za-z0-9 and underscore (_)
Example RSV_MEETING_ROOM
Meaning Form Family indicates a set of similar forms which only differ in form generation and/or form version
Good practice AAA_SHORT_NAME where all the letters are in upper case, AAA means the 3-digit-prefix of Project
  • For the remain columns, you can leave them blank:

    • default_language (used to set default language of e-form in cases of multi-languages)
    • public_key
    • submission_url
  • Here is an example of sheet settings in an actual project:

form_title form_id version instance_name public_key submission_url default_language generation family
[SVY] BASIC CONTACT PROFILE (1 - 1911111626) CRM_NEW_BASIC_CONTACT_PROFILE_G1 1911111626 concat(${uuid_ssname})     en 1 CRM_NEW_BASIC_CONTACT_PROFILE
  • Here is an example of sheet settings in an actual basic xlsform:

    xlsform-settings-01a-sheet-basic

  • Here is the layout of the basic xlsform settings in mobile screen:

    xlsform-settings-02a-ui-basic

  • Here is a sample of Basic Xlsform BASIC_XLSFORM_SAMPLE.xlsx

How to design an intermediate xlsform

  • In practical, you may want your survey to do more, such as grouping questions into 1 screen, skipping irrelevant questions for some respondents, requiring some important questions not to be left blank, or limiting some question answers to be within a specific range,…
  • To make the xlsform satisfying the above demands, you need to know about the following knowlege in sheet survey:

required & required_message

Column required
Value In most cases, a yes is enough. For other complex situation, a conditional expression [1] may apply.
Meaning If the question is required, respondents have to answer the question or they cannot finish the questionnaire.
Column required_message
Value User friendly text
Meaning This column contains the message informing respondents whener they leave the required questions unanswered.
  • Here is an example of required and required_message:

    xlsform-survey-01b-required-intermediate

  • Here is how required and required_message are displayed on mobile screen:

    xlsform-survey-02b-required-ui-intermediate

constraint & constraint_message

Column constraint
Value In most cases, a conditional expression [1] satisfies the constraint rule.
Meaning If the answer violates the constraint rule, respondents cannot finish the questionnaire.
Column constraint_message
Value User friendly text
Meaning This column contains the message informing respondents whenever they enter invalid values (values violating constraint rules).
  • Here is an example of constraint and constraint_message:
type name label constraint constraint_message
integer care1_q5j [Q5j] How many male members does your family have? ${care1_q5j} >= 0 Please fill in valid male members
integer care1_q5k [Q5k] How many female members does your family have? . >= 0 Please fill in valid female members
  • Here is how constraint and constraint_message are displayed on mobile screen:

    xlsform-survey-02b-constraint-ui-intermediate

relevant

Column relevant
Value In most cases, a conditional expression [1] satisfies the skipping rule.
Meaning This column is used to show the relationship between the questions. It is possible to allow respondents to skip one or more questions based on the answers to the previous question.
  • Here is an example of actual survey needed to use relevant:

    • Survey problem: Question 42.1 ONLY shows up when respondents say “Yes” to question 42.
    • Translated to technical problem: mlw03_q42_1 shows up ONLY WHEN mlw03_q42 equals to “1”
    • Solution: We put ${mlw03_q42} = 1 in column relevant
  • Here is an example of relevant in an actual xlsform:

    sheet survey

    type name label relevant
    select_one yesno mlw03_q42
    1. Do any classes at this school have to share a classroom?
     
    text mlw03_q42_1 42.1 Which classes share? ${mlw03_q42} = 1

    sheet choices

    list_name name label
    yesno 1 Yes
    yesno 0 No
  • Here is how relevant works on mobile screen:

    xlsform-survey-02b-relevant-ui-intermediate

group

Column type
Value begin group and end group
Meaning To group several questions for the same skipping (relevant) or the same screen (appearance)
Column appearance
Value field-list or table-list
Meaning To group the questions between the begin group and end group into 1 screen

Note

Both field-list and table-list allow a group of questions (select_one, select_multiple, note, text, integer, decimal) displayed on the same screen. However, table-list only accepts the select_one or select_multiple questions having the same list_name.

  • Here is an example of group in an actual xlsform:

    xlsform-survey-01b-group-intermediate

  • Here is how group works on mobile screen:

    xlsform-survey-02b-group-ui-intermediate

appearance

Column appearance
Value Supported list can be found at Question layouts
Meaning This column is used to configurate the layout of questions, making the e-form more beautiful, convenient and space saving
  • Here is an example of common appearance in an actual xlsform:

    xlsform-survey-01b-appearance-intermediate

  • Here is how appearance works on mobile screen:

    thousandsep

    xlsform-survey-02b-appearance-thousandsep-ui-intermediate

    minimal

    xlsform-survey-02b-appearance-minimal-ui-intermediate

    rating_box

    xlsform-survey-02b-appearance-ratingbox-ui-intermediate

    tagging

    xlsform-survey-02b-appearance-tagging-ui-intermediate

    boxtag

    xlsform-survey-02b-appearance-boxtag-ui-intermediate

    embed

    xlsform-survey-02b-appearance-embed-ui-intermediate

    text-nolabel

    xlsform-survey-02b-appearance-textnolabel-ui-intermediate

    inline

    xlsform-survey-02b-appearance-inline-ui-intermediate

    star_rating

    xlsform-survey-02b-appearance-starrating-ui-intermediate

Intermediate Xlsform Example

  • Here is an example of sheet survey in an actual intermediate xlsform:

    xlsform-survey-01b-sheet-intermediate

  • Here is the layout of the intermediate xlsform survey in mobile screen:

    xlsform-survey-02b-ui-intermediate-01

    xlsform-survey-02b-ui-intermediate-02

How to design an advanced xlsform

In some survey, enumerators need to show images or videos to respondents before conducting the interview, or survey managers want to prevent enumerators to go through the survey in a disorderly manner… Then, the e-form may need other preload files such as media files (images, videos, audios) or setting files (form setting, data setting,…) to serve those purposes.

media preload

See also

Xlsform - media preload

settings preload

See also

Xlsform - settings preload

[1](1, 2, 3) See Operators and functions for more details