# Managing Forms in Collect¶

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

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.

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.

• 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.

Note

• 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 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


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

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

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 you share forms with another user, you need to share the parent folder which contains a form and a folder with media files. Sharing both of them separately wouldn't be enough.
• 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

2. Select a form 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.

## Transferring Finalized Forms¶

To perform analysis on data collected with the Collect app, you will need to get the filled forms off of the devices. Generally, this is done by uploading them to an ODK server or Google Sheets. To do this, you will first need to configure a server.

In some cases, you may want to pull filled forms directly from a device. This can be simpler than setting up a server if you are only using a small number of devices or when there is no Internet access. It can also be helpful to recover from submission failures.

### Sending Finalized Forms to a Server¶

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

Uploading a filled form from within the Collect app marks that form as sent. 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.

Values from questions: text, select_multiple and barcode will be preceded by an apostrophe. This prevents Google Sheets from guessing at the data type and applying a format that may not be appropriate (e.g. making 1940 10 5 into a date when it actually is the value of a select multiple). Raw values may be used in any kind of computation and the apostrophes only are visible when editing a value. You may choose to manually apply a format for certain columns if desired.

Note

Using Google Drive as a server, filled forms are sent to the first sheet in a given spreadsheet, no matter what its name is. If you use one spreadsheet to keep a form definition and to collect filled forms make sure the sheet you expect to be filled is in the first place.

### Sending Previously-Sent Forms¶

If you can't find a submission that you expect on your server or need to re-send a submission for other reasons, you can change the view of the Send Finalized Forms screen to show both sent and unsent forms.

To show sent and unsent forms:
⋮ ‣ Change View ‣ Show Sent and Unsent Forms

### Pulling Forms into Briefcase¶

ODK Briefcase is a desktop application that can be used to pull filled forms to your local computer. You will first need to transfer the filled forms to your computer. This will not update the state of the form to Sent.

## Deleting Forms¶

You can delete Blank forms as well as filled forms in any state (Saved, Finalized, or Sent). Deleting Blank forms or filled forms in Saved or Finalized state removes every trace of that form definition or filled form. Deleting a Sent form deletes the form contents but metadata associated with it including the deletion date and the instance name are maintained for display in the View Sent Form list.

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

2. Select the Saved Forms or Blank Forms tab.

Note

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

### 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.