Managing Forms in Collect

See also

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

Downloading forms from a server

A blank form or form definition is what users of ODK Collect fill out. Blank forms are usually created using XLSForm.

In order to fill out forms, you must first load blank forms into the Collect App. The preferred way of doing this is by automatically matching the forms provided by the server and this is the default when using Central App Users. You can also configure Collect so that blank forms must be manually selected and downloaded.

If you have connected ODK Collect to a server and Collect is not configured to automatically download forms from it, you will need to download the forms that you want to use.

Select Download form on the app home screen to browse available forms and download them to your device. Select the ones you would like download, and tap Get Selected.

The Main Menu of the Collect app. The option *Download form* has a red arrow pointing to it. 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 your server to Collect, a form has to be uploaded. See Form Management in ODK Central.

Editing drafts

When filling out a form, you can save it as a draft and edit it later.

The Drafts list shows all drafts by their name which can include user-provided values from inside the draft. The expression for those names is specified in the form definition. By default, drafts are sorted alphabetically by name. When the sort order is changed, the selected order is maintained the next time that the draft list is opened. You can use the magnifying glass icon to for search drafts by name.

Each draft has a colored pill indicating its validation status. Drafts that have missing required questions or values that violate constraints are marked with a red Errors pill. Drafts in which all required questions have been filled out and that have no constraint violations are marked with a blue No errors pill.

The Main Menu of the Collect app. The button *Drafts* has a red arrow pointing to it. The Drafts screen. Several drafts are listed by name.

Finalizing drafts

Note

In Collect versions prior to v2023.3, it was possible to edit finalized forms. If your workflow involves adding or removing data up until form submission time, consider configuring Collect to hide the Finalize or Send button from the form end screen (see the form entry access control section of protected settings) and using bulk finalization instead.

If your device is online and Collect is configured to automatically send submissions, you can send send a filled form immediately from the form end screen by tapping the Send button.

If your device is offline or Collect is not configured to automatically send submissions, you will need to finalize a draft before it can be sent. Finalized forms are available from the Ready to send screen where they can be viewed or sent. You can finalize a form from the end screen by tapping the Finalize button.

Bulk finalizing drafts

Warning

Bulk finalization does not work with submission encryption.

If you want to continue modifying data up until the moment when forms are ready to sent, you will need to save those forms as drafts. When you're ready to send them, you could then open each draft, navigate to the form end screen, and tap the Finalize or Send button. However, this would be inconvenient if you have many drafts that are ready to be sent. In that case, you can use the option to finalize all drafts.

Open the Action Menu () and select Finalize all drafts:

The Drafts screen. Several drafts are listed by name and the action menu is open. The Drafts screen. Only one draft is shown and is marked as having validation errors. A message at the bottom of the screen says that 2 drafts were finalized and 1 has errors that must be addressed before finalizing.

You will first see a confirmation dialog describing that bulk finalization cannot be undone. If you choose to bulk finalize, all drafts without errors will be finalized.

After bulk finalization is complete, you will see a message at the bottom of the screen describing how many drafts were and weren't finalized. Drafts with constraint violations or missing required questions can't be finalized and will remain on the drafts screen. Drafts with data recovered after a crash or forced quit also can't be bulk finalized, even if they are marked with No errors. You will need to open those drafts, decide whether or not to keep the recovered data, and then finalize them.

Bulk finalization will update any end fields in the forms (see metadata fields) but will not result in any entry in the audit log.

Sending finalized forms

To use data collected with the Collect app, you will need to get the filled forms off of the devices. The preferred way of doing this is by automatically sending submissions to a server as soon as they are finalized and this is the default when using Central App Users. To send forms, you will first need to configure a server.

If you are offline or have turned automatic submission off in settings, you will find finalized forms in the Ready to send list, displayed by the name that the form definition specifies. When there are forms that are ready to send, you will see a blue notification badge on the Ready to send button and its title will become bold.

Uploading a filled form from within the Collect app changes that filled form's status from finalized to sent. Sent forms remain viewable from the Sent list until they are deleted.

The Main Menu of the Collect app. The *Ready to send* button has a red arrow pointing to it.

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 Ready to send screen to show both sent and unsent forms.

To show sent and unsent forms:

⋮ ‣ Change View ‣ Show Sent and Unsent Forms

The "Ready to send" screen of the Collect app. The *Change View* option has a red arrow pointing to it.

Deleting Forms

You can delete filled forms in any state (Draft, Finalized, or Sent). 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 Sent list.

If your device is not configured to exactly match the forms provided by the server, you can delete Blank forms. When Collect is configured to exactly match the forms provided by the server, any previously-downloaded forms that is closed or deleted from the server will automatically be deleted by Collect.

When a blank form is deleted, it is completely removed from the device if it has no filled forms associated with it. However, if there are filled forms that were created with that form definition, it will be hidden from Start new form but will still be available on the device so that the remaining filled forms can be opened. Once all the related filled forms are deleted, the form definition and its media files will be permanently deleted as well.

Select Delete from the Collect Main Menu. You can use the Saved Forms and Blank Forms tabs to toggle between a list of all filled forms in any state and a list of all blank forms.

The Main Menu of the Collect app. The option *Delete forms* has an arrow pointing to it. 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*.

Note

When sent forms are deleted, they are listed in the Sent page, but are grayed out and can't be viewed. This lets you see confirmation of filled forms that have been sent without keeping all of the data on the device.

The Sent page in Collect app. Three sent forms are listed, and the second and third have been deleted. They are both grayed out and below the form names is the note *Deleted*, along with a date and time.

Managing forms without a server

If you are working entirely offline with a small group of data collectors, you may find it convenient to manage forms by plugging devices into a computer rather than using a server.

These approaches can also be helpful in case of problems that require troubleshooting.

Loading Forms directly

Loading forms with adb

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

$ adb push path/to/form.xml <collect-directory>/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 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 may look different on your device.

    The Settings menu on an Android Device. The option *Storage and USB* is circled in red.
  2. From the internal storage screen, select Explore to open the file manager. The Explore option opens a file manager that you can use to move forms into Collect.

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

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 must be placed in a folder labeled form-name-media.

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 with adb

You can also delete form instances directly with Android Debug Bridge. They are stored in the instances subdirectory of your Collect directory, with a directory for each instance.

Did this page help you?

Selecting an option will open a 1-question survey

👍 Yes 👎 No