Skip to content

Latest commit

 

History

History
168 lines (97 loc) · 7.13 KB

collect-forms.rst

File metadata and controls

168 lines (97 loc) · 7.13 KB

Form Management in Collect

Loading Blank Forms

A :dfn:`blank form` is a .xml file containing a form definition consistent with the XForm specification. Blank forms can be created using ODK Build or :doc:`XLSForm <xlsform>`.

In order to fill out forms with survey participants, you must first load blank forms into the Collect App.

Loading Forms from ODK Aggregate Server or Google Drive

If you have :ref:`connected ODK Collect to a server <connecting-to-server>` or :ref:`Google Drive <connecting-to-google>`, use :guilabel:`Get blank forms` on the app home screen to browse available forms and download them to your device.

Note

Before downloading blank forms from Aggregate or Google Drive to Collect, those forms have to be uploaded to those locations.

Loading forms directly

You can load forms directly from a computer to your device via USB, using :doc:`Android Debug Bridge <collect-adb>`.

$ adb push path/to/form.xml /sdcard/odk/forms/form.xml

You can also download forms to your device via a web browser, and move them to the :file:`odk/forms/` directory, using the device's file manager (:menuselection:`Settings -> Storage & USB -> Explore`).

Loading form media

If a form :ref:`includes images or other media <image-options>`, those files have to be loaded to the device along with the form.

Media files should be placed in a folder labelled :file:`{form-name}-media`.

Filling out forms

Once you have at least one form :ref:`loaded into ODK Collect <loading-forms-into-collect>`, you can fill out a form.

For a (mostly) complete guide to form question appearance, see :doc:`form-widgets`.

Completing a Form

Once you have reached the end of a form, you will have the opportunity to Save and Exit the form. At this point, you may also:

Name the form

The last form screen provides a default name for the form (defined by the form designer). You can rename it. This name only applies to that particular instance of a completed form (not to the blank form).

The Form Name identifies the form in lists throughout the app. For this reason, a meaningful name may be important to you. After you've saved the name, the form automatically moves to the :guilabel:`Send Finalized Form` section, from where you can send it.

Mark the form as Finalized

Only :formstate:`Finalized` forms can be :ref:`uploaded to a server <uploading-forms>`.

Editing Saved forms

This will reopen the form, which you are then free to edit.

Note

Uploading Finalized Forms

If you are connected to :ref:`an ODK Aggregate server <connecting-to-aggregate>` or :ref:`Google Drive Account <connecting-to-google>`, use :guilabel:`Send Finalized Forms` to upload :formstate:`Finalized` form instances.

For local form management, use :doc:`ODK Briefcase <briefcase-forms>` to pull :formstate:`Finalized` form instances to your local computer.

:formstate:`Sent` forms are no longer editable, but they remain viewable until they are deleted.

Note

Blank values in the form are sent to google sheets as cells with a space and not as empty cells. When you are testing for empty cells, you might not get the correct results. To make sure you get the correct results, you could:

  • Use the TRIM function in the google sheets to remove the leading and trailing spaces from the cells.
  • Define empty cell in your tests to be a cell that is either empty or contains a single space.

Note

Deleting Forms

You can delete :formstate:`Saved`, :formstate:`Finalized`, :formstate:`Sent`, and :formstate:`Blank` forms by selecting :guilabel:`Delete Saved Form` on the app home screen. This page contains two tabs, :guilabel:`Saved Forms`, which contains the list of all form instances that are saved, finalized or sent, and :guilabel:`Blank Forms`.

You can also delete form instances directly with :command:`adb`. They are stored in :file:`sdcard/odk/instances`, with a directory for each instance.

Note

  • Deleted Forms are listed, but cannot be viewed. They are indicated with the crossed-out eye icon.