XLSForm Development & Basic Format
Find full documentation here: http://xlsform.org/en/
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.
The XLSForm is then converted to an XForm, 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. XLSForms are compatible with the subset of XForm functionality supported by Javarosa Project. XLSForms are supported by a number of popular data collection platforms.
Each Excel workbook usually has two worksheets: survey and choices. A third optional worksheet called settings can add additional specifications to your form and is described below.
The survey worksheet
This worksheet gives your form its overall structure and contains most of the content of the form. It contains the full list of questions and information about how they should appear in the form. Each row usually represents one question; however, there are certain other features described below that you can add to the form to improve the user experience.
The choices worksheet
This worksheet is used to specify the answer choices for multiple choice questions. Each row represents an answer choice. Answer choices with the same list name are considered part of a related set of choices and will appear together for a question. This also allows a set of choices to be reused for multiple questions (for example, yes/no questions).
Both of these worksheets have a set of mandatory columns that must be present for the form to work. Additionally, each worksheet has a set of optional columns that allow further control over the behavior of each entry in the form, but are not essential to have. Every entry must have values for each of the mandatory columns, but the optional columns may be left blank.
- The survey worksheet has 3 mandatory columns: type, name, and label.
- The type column specifies the type of entry you are adding.
- The name column specifies the unique variable name for that entry. No two entries can have the same name. Names have to start with a letter or an underscore. Names can only contain letters, digits, hyphens, underscores, and periods. Names are case-sensitive.
- The label column contains the actual text you see in the form. Alternatively, label translation columns can be used
- The choices worksheet has 3 mandatory columns as well: list name, name, and label.
- The list name column lets you group together a set of related answer choices, i.e., answer choices that should appear together under the questions that are multiple choice (and one or many answers can be selected)
- The name column specifies the unique variable name for that answer choice.
The label column shows the answer choice exactly as you want it to appear on the form. Alternatively, label translation columns can be used.
The columns you add to your Excel workbook, whether they are mandatory or optional, may appear in any order. Optional columns may be left out completely. Any number of rows may be left blank. All .xls file formatting is ignored, so you can use dividing lines, shading, and other font formatting to make the form more readable.
One thing to keep in mind when authoring forms in Excel is that the syntax you use must be precise. For example, if you write Choices or choice instead of choices, the form won’t work.