Managing Forms in Collect

See also

For an overview on forms and form design, see Intro to Forms in ODK.

Loading Blank Forms

A blank form is a .xml file containing a form definition consistent with the XForm specification. Blank forms can be created using ODK Build or 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 connected ODK Collect to a server or Google Drive:

  1. Select Get blank forms on the app home screen to browse available forms and download them to your device.

    The Main Menu of the Collect app. The option *Get Blank Form* is circled in red.
  2. Find and download forms.

    • If you are using ODK Aggregate, you will see a list of available forms. Select the ones you would like download, and tap Get Selected.

      The Get Blank Form screen in the Collect app. Several form names are listed, with checkboxes. One form's checkbox is checked. At the bottom are buttons labeled: *Select All*, *Refresh*, and *Get Selected*.

    Note

    Before downloading blank forms from Aggregate to Collect, a form has to be uploaded. See Form Management in ODK Aggregate.

    • If you are using Google Drive, the Get Blank Form screen will display the folders in your Google Drive account and any XML documents. Select and download the forms you want.

      Warning

      All XML documents in Google Drive will appear in Collect. XML documents will be listed even if they are not valid XForms.

      And you can actually download any XML document, even if it isn't a real XForm.

      But you can't Fill Out a non-form.

Loading forms directly

Loading forms with adb

You can load forms directly from a computer to your device via USB, using Android Debug Bridge.

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

Loading forms from device storage

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

  1. Go to the Settings menu () on your device and find Storage & USB

    The Settings menu on an Android Device. The option *Storage and USB* is circled in red.

    The settings menu may look different on your device.

  2. From the internal storage screen, select Explore to open the file manager.

    The Internal Storage settings menu on an Android device. The option *Explore* is circled in red.

    The Explore option opens a file manager that you can use to move forms into Collect.

Loading form media

If a form includes images or other media, those files have to be loaded to the device along with the form.

Media files should be placed in a folder labeled form-name-media.

  • When using ODK Aggregate, the form upload prompt includes instructions to upload the -media folder. The files are downloaded automatically when fetching forms from Aggregate.
  • When using Google Drive, the -media folder should be uploaded to the same location as the form.
  • If loading forms directly to your device, the -media folder needs to be placed in the sdcard/odk/forms directory, alongside the form itself.

Editing Saved forms

Completed (filled-in) form instances can be edited after they have been saved.

  1. Select Edit Saved Form

    The Main Menu of the Collect app. The option *Edit Saved Menu* is circled in red.
  2. Select a form by name

    The Edit Saved Form screen. Several completed forms are listed by name.

This will reopen the form instance, which you are then free to edit. Form instances are listed by name, which is one reason it can be helpful to name the form instance after filling it out.

Note

  • Sent forms will not appear in the Edit Saved Forms list.
  • Sent forms, will be available for viewing in View Sent Forms list, along with the details which cannot be edited.
  • You may freely edit Saved and Finalized forms.

Uploading Finalized Forms

Eventually, you will want to upload completed form instances for analysis and data aggregation.

Doing this from within the Collect app marks the forms as sent. Sent forms are no longer editable, but they remain viewable until they are deleted.

Uploading to Aggregate or Google Drive

If you are connected to an ODK Aggregate server or Google Drive Account, use Send Finalized Forms to upload Finalized form instances.

The Main Menu of the Collect app. The *Send Finalized Form* option is circled in red.

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.

Pulling forms with Briefcase

For local form management, use ODK Briefcase to pull Finalized form instances to your local computer.

Pulling forms with adb

You can copy form instances from the device using adb pull, however this will not update the state of the form to Sent.

Deleting Forms

You can delete Saved, Finalized, Sent, and Blank forms.

  1. Select Delete Saved Form on the app home screen.

    The Main Menu of the Collect app. The option *Delete Saved Forms* is circled in red.
  2. Select the Saved Forms or Blank Forms tab.

    The Delete Saved Forms screen in the Collect app. There are two available tabs: *Saved Forms* and *Blank Forms*. The *Saved Forms* tab is active. Below that is a list of saved form instances, with checkboxes. There are buttons labeled: *Select All* and *Delete Selected*.

    The Saved Forms tab lists form instances that are saved, finalized, or sent.

    The Delete Saved Forms screen in the Collect app. There are two available tabs: *Saved Forms* and *Blank Forms*. The *Blank Forms* tab is active. Below that is a list of blank forms, with checkboxes. There are buttons labeled: *Select All* and *Delete Selected*.

    The Blank Forms tab lists blank forms.

Note

Deleted Forms are listed in the View Sent Forms page, but cannot be viewed. They are indicated with the crossed-out eye icon.

The View Sent Forms page in Collect app. Two sent forms are listed, but the second one, *Hypertension Screening* has been deleted. Next to the form name is an icon of an eye, crossed out. Below the form name is the note *Deleted*, along with a date and time.

Deleting Forms with adb

You can also delete form instances directly with Android Debug Bridge. They are stored in sdcard/odk/instances, with a directory for each instance.