This guide will show you how to create and manage forms using the XLSForm syntax.
XLSForm is a syntax used to author forms using a spreadsheet program such as Excel or Google Sheets. It is a practical standard for sharing and collaborating when creating forms. The XLSForm syntax is human readable, so it is easy to learn and use. As the name implies, XLSForm files are saved as .xls or .xlsx files for import into Ona.
Ona uses XLSForm because it makes it easy to create, collaborate and edit forms of any length or complexity. It’s also easy to work from previously-made forms, saving time and letting you share your form easily.
We recommend that you start with the basic form tutorial. You can also watch the XLSForm Authoring video. Next, if you already have a form you want to create, you can start authoring using XLSForm.org for reference and asking questions you have on the Ona Community Support Forum.
We’ve also provided several starter XLSForms to give you a sense of the possibilities and give you a place to start if you are authoring a similar form. Another option for starting from an existing form is using a form that you have access to on Ona. You can download an existing form by going to the form’s Settings page, clicking on the Form Info tab, then selecting Download XLSForm from the Source dropdown menu.
These are three useful tips that the designers should be aware of:
For this tutorial we will be using the following survey:
To write a simple form, each Excel workbook usually has two main worksheets: survey and choices. The survey worksheet gives your form its overall structure and contains most of the content of the form. The choices worksheet is used specify the answer choices for multiple choice questions. Each row in this worksheet represents an answer choice.
Adding media files, such as image, audio, or video to your XLSForm can add context to your questions and provide visual and audio support to surveyors or surveyees. You can add the following media files to your form:
|Image files||jpeg, jpg, png, zip|
|Audio files||mp3, wav|
|Video files||3gp, mp4|
An example of a form with media files is the Bird Watching survey. Respondents are asked to select which bird they sighted from a list. A picture of each bird species is included next to the bird name to help the respondent verify their selection as shown in the screen shot below.
The survey worksheet from this XLSForm is shown in the screen shot below:
The choices worksheet can be seen in the screen shot below:
The media::image column in the choices worksheet of your survey. Next to each answer choice of a bird, the corresponding image file name is written in the media::image column, including the image file extension (.png or .jpg).
If you wanted to include audio or video in your form, then you would simply add separate media::audio and media::video columns to your form and add the corresponding audio and video file names in those columns. Media files can be added to questions in the survey tab of your XLSForm in addition to answer choices in the choices tab.
In addition, if your survey has multiple languages, you will need to have separate media columns for each language by appending ::language to the media columns. For example, to add image media files to a survey with both English and Swahili languages, you would add the following two columns to your XLSForm:
media::image::English and media::image::Swahili
If using the same image for both languages, you simply write the same image file name in both columns.
For audio and video files, you would simply replace image with audio and video, respectively:
media::audio::English and media::audio::Swahili
media::video::English and media::video::Swahili
In order for media files to be displayed in the form, the media files need to be uploaded to the form on your Ona account.
The media file names that you upload to the form on Ona must match exactly the media file name specified in the media column in your XLSForm. Spelling and punctuation are important! For example, if your media file is named as blackbird.png, then you cannot reference it as Blackbird.png or blackbirdpng in your XLSForm.
Once your media files are uploaded to the form, they are automatically displayed when viewing your Enketo webform. If using ODK Collect, the media files will automatically download with the form to your phone or tablet and be stored in the form’s media folder on your device. If downloading media files to your phone presents a challenge, see the instructions on how to manually add media files to your phone instead.
Once you have successfully authored your XLSForm, you can upload it to your desired project in Ona. After uploading, you can preview the webform. Read more on the various ways of uploading XLSForms here.
Forms uploaded to your Ona account can be replaced using the Replace Form option in the form’s dropdown menu. You can to replace a form that has no submissions as explained in this guide. Ona also supports replacing a form that has submissions.
In order to replace an existing form on Ona, the form id’s must be the same. If you must change the form id on the updated version, then you will need to upload it as a new form.
An inactive form cannot receive any submissions, and inactive forms do not show up in the list of forms available to download when using ODK Collect. Essentially, making a form inactive archives the form and helps prevent any changes from being made to the form or its data.
Making a form inactive is a good option when data collection has finished, as it prevents users from making changes, and the inactive form and its data will be stored on Ona indefinitely. It is also a good alternative to deleting a form from your account. Data contained in an inactive form will still be available in your account and can be accessed by making the form active once again.
When uploading your XLSForm, you can choose Inactive from the form upload verification window.
Forms already uploaded to your Ona account can be made inactive using the Make inactive option in the form’s dropdown menu as highlighted in the screeen shot below;
When you first access the project view page, by default all inactive forms and the number of inactive forms are shown in paranthesis. The Show inactive checkbox is automatically selected, next the number of inactive forms is also revealed:
If you not all the forms including the inactive forms you can turn off, click on the Show inactive checkbox, inactive forms will no longer be revealed:
To make inactive forms active again, ensure the Show inactive checkbox is selected then from the inactive form’s dropdown menu, select Make active option as shown in the screen shot below;
Forms uploaded to a project can be moved to a selected project as long as you have add form permissions in that project.
To move a form to different project:
Forms uploaded to your Ona account can be deleted using the Delete Form option in the form’s dropdown menu. Below are the steps to follow to delete a form in your Ona account.
To Delete a form:
Deleting a form cannot be undone. Once a form is deleted, the form and any data already submitted or uploaded to the form will be gone and cannot be recovered.