eyecatch

How to Speed Up Attribute Entry in QField

Published: Last updated:
This article uses QGIS 3.40. The current LTR is 3.44.

What you'll learn


  • How to set up toggle switch and drop-down menu attributes in QField
  • Steps for using QGIS attribute forms to make data entry in QField more efficient

Recommended for


  • Anyone who uses QField for field surveys and wants to make data entry more efficient
  • Anyone who wants to avoid errors when entering attributes and improve data accuracy
  • Anyone who wants to build a smoother survey workflow by combining QGIS and QField

Introduction

QField is a convenient app that brings an environment close to QGIS to smartphones and tablets. In field surveys, however, an easy-to-use interface is important for entering data efficiently.

By default, QField requires you to type attribute data on the keyboard, which makes typing errors likely.

Manual entry can lead to typing errors (created by processing GSI Tiles from the Geospatial Information Authority of Japan (GSI))
Manual entry can lead to typing errors (created by processing GSI Tiles from the Geospatial Information Authority of Japan (GSI))

To solve this problem, you can set toggle switches or drop-down menus for QField attributes, which greatly improves the efficiency and accuracy of data entry. This article explains in detail the steps for setting up these efficient ways of entering attributes.

How to set up toggle switches

A toggle switch lets you enter a Boolean value (TRUE or FALSE) with a single tap. To use a toggle switch in QField, you need to set it up in QGIS beforehand.

Toggle switch attribute (created by processing GSI Tiles)
Toggle switch attribute (created by processing GSI Tiles)

Set up the attribute in QGIS

In QGIS, use a Boolean attribute and set its widget type to a checkbox in the layer's attributes form.

Open the QGIS project and add a Boolean attribute (in this example, hanami). Then open the properties of the target layer. In the Attributes Form tab, select the attribute and set Widget Type to Checkbox.

Set the widget type to Checkbox in the QGIS attributes form
Set the widget type to Checkbox in the QGIS attributes form

When the setup is done, you can enter the attribute easily with a checkbox.

The Boolean attribute appears as a checkbox
The Boolean attribute appears as a checkbox

For details on setting up attribute forms, see the following article.

Check the result in QField

Next, check how this setting appears in the QField app. Save the QGIS project and transfer it to your mobile device. The following article covers how to transfer a project.

When the transfer finishes, open the project in QField. In digitize mode, tap a feature, and the attribute appears as a toggle switch. A single tap switches it on or off, which greatly improves efficiency in the field.

The Boolean attribute appears as a toggle switch (created by processing GSI Tiles)
The Boolean attribute appears as a toggle switch (created by processing GSI Tiles)

How to set up drop-down menus

For choice attributes, you select a value from predefined values. This makes choosing a value in the field faster than typing it and prevents entry errors.

Drop-down menu attribute (created by processing GSI Tiles)
Drop-down menu attribute (created by processing GSI Tiles)

Set up the attribute in QGIS

As before, set this up in QGIS in advance. First, add a text attribute (in this example, sakura_type) to the layer. Then, in the Attributes Form tab, select the attribute, set Widget Type to Value Map, and define the values that can be entered.

Set the widget type to Value Map in the QGIS attributes form
Set the widget type to Value Map in the QGIS attributes form

When the setup is done, you can set the attribute from a drop-down menu.

The text attribute appears as a drop-down menu
The text attribute appears as a drop-down menu

Check the result in QField

Check the setting in the QField app. Transfer the project to your mobile device, then select a feature of the target layer to open its feature form. The attribute you set appears as a drop-down menu. You can now choose a value from the predefined values, which makes data entry more efficient.

The text attribute appears as a drop-down menu in QField (created by processing GSI Tiles)
The text attribute appears as a drop-down menu in QField (created by processing GSI Tiles)

Switch to selection buttons

In addition to drop-down menus, QField lets you enter data with selection buttons, as in the figure below. This style is especially effective when there are few choices. All choices are listed on the screen, so you can enter a value quickly with one tap.

Example of selection buttons (created by processing GSI Tiles)
Example of selection buttons (created by processing GSI Tiles)

To set up selection buttons, first set the target attribute to the Value Map widget type in QGIS, as described above. An additional setting is then required. Open the properties of the target layer and select the QField tab. This tab appears when you install the QFieldSync plugin.

The QField tab in the layer properties
The QField tab in the layer properties

In the Feature Form, Attachments and Relationships Settings section, the Item threshold under which value map editor widgets will use a toggle buttons interface option shows Disabled by default.

For example, if you set this value to 10 items, QField shows a value map as selection buttons when it has fewer than 10 items, and as a drop-down menu when it has 10 or more.

Set “Item threshold under which value map editor widgets will use a toggle buttons interface”
Set “Item threshold under which value map editor widgets will use a toggle buttons interface”

Save the settings and transfer the project to QField again. The attribute now appears as selection buttons.

The text attribute appears as selection buttons in QField (created by processing GSI Tiles)
The text attribute appears as selection buttons in QField (created by processing GSI Tiles)

Conclusion

This article explained how to set up attribute entry with toggle switches, drop-down menus, and selection buttons. These settings make data entry in the field much easier and contribute greatly to more efficient entry and fewer mistakes. Try them in your own projects.

About the author
QGIS LAB Editorial Team
QGIS LAB Editorial Team

QGIS LAB is a comprehensive information hub for QGIS, the open-source GIS software. Under the concept of “Geospatial for Greater Good,” we share the knowledge and skills to open up the world through location data.