Configure feature attribute forms in your QGIS project before performing fieldwork.
Form configuration in QGIS for QField operates similarly to standard QGIS projects, with specific mobile optimizations.
To configure an attribute form, open vector layer properties by navigating to Vector Layer Properties... > Attribute Form in QGIS.
Select appropriate widget types based on the expected behavior of each attribute.
The table below summarizes attribute widget types supported in QField.
Below is an overview what widget types are available and supported in QField.
To configure your attribute form there are some other general useful settings, which you can find in
Vector Layer > Properties > Attribute form (see image below).
General Attribute Form
Drag and drop designer": Organize form layouts using containers such as tabs and groups.
Incorporate conditional visibility rules and default values to enhance form interactivity.
Read more in the QGIS Drag and Drop Designer Documentation.
Hide attribute form upon: You can hide the attribute form by changing from the "Show form on Add Feature" to the setting "Suppress attribute form".
When adding a new feature in QField, no attribute form needs to be populated.
Note: In such a case, you have to configure the attribute form in such a way that all constraints/rules are met even if you do not add any attributes.
Editable: You can decide whether a field is editable or not by activating it in the widget display of the corresponding field.
Remember last values: If you don't want to add the same value again and again you can enable this option under the widget display in QGIS.
QField, however, offers a more fine-grained control over the last used values.
If you enable this option in QGIS, the rule will always apply.
With QField you can change and disable this option at any point during data collection.
Default values": Pre-fills attribute fields using QGIS expressions.
QField supports positioning variables (such as GNSS variables)
and QFieldCloud variables.
When using value maps as a widget type you can decide whether you want the value options as a list or buttons.
You select the maximum number of values with which the threshold between list and buttons will be set.
QField Value Map Editor as Buttons
Workflow
Direct Vector Layer Properties > QField
Under the Feature Form Settings enable and define the maximum quantity of items above which the when the selection option changes from buttons to the list format
QFieldSync Layer Properties.
If you set the Document Viewer to a specific media type(Image, Video, Audio, or File) under the QGIS Attachment (External Resource) widget's setting, in QField, by default the default option will be set to that type.
However, QField users can still attach files or media of other types through the 3-dotted menu (⋮).
You can restrict which attachment types are permitted for the individual attributes via the QFieldSync settings.
Workflow
Direct to Project > Properties... and switch to the QField tab.
Locate the attachment configuration table listing each layer and attachment field.
In the Accepted Types column for the target field, open the dropdown menu and check one or more allowed attachment categories:
Image: Still photos, gallery images, and freehand sketches.
Video: Recorded videos and gallery video clips.
Audio: Recorded audio clips and audio files.
Other: General documents and text files (such as PDFs, CSVs, or text documents).
Click OK to save your project settings.
Configuring accepted attachment types in QFieldSync
Note
When no options are checked in the Accepted Types dropdown, the field displays Anything and accepts all attachment and media types, falling back to the field's QGIS Document Viewer setting to determine the primary quick-action button.
The Value Relation widget displays values from a related layer in a combobox or toggle button layout.
The Value Relation widget supports toggle button interfaces similar to Value Map widgets.
Configure the following parameters:
Layer: Select the layer containing lookup values.
Key column: Select the attribute column containing saved key values.
Value column: Select the attribute column displaying readable labels during data collection.
Order by Value: Sort displayed values by key, value, or a specified column.
Group column: Group lookup values using another attribute column (such as grouping tree species by genus).
When grouped, QField displays the widget as a list regardless of toggle button settings.
Allow NULL value: Allows leaving the field blank.
Use Completer: Enables auto-complete searching across available lookup values.
Allow multiple selections: Allows selecting multiple lookup values for a single feature.
Choose the column that will be used to organize the items.
The values from this column will act as group title.
(Optional) Enable Display group name if you want to add the title of your group as a distinct header.
This creates a clear separation between the different groups, making the list easier to navigate.
You can hide whole groups based on expressions.
This is useful when certain attributes are only required under certain conditions.
Workflow
Example: Accessing the status of tree species
Some of them might have a disease and you have a list of possible diseases.
Create a group.
Define a visibility expression for the group.
Eg. Only if the tree is marked as "sick", the field "disease" will appear.
Add the field that is to be shown only after the expression criteria is set into the group.
Eg. We will add our "type of disease" field into the group.
Configuration of a group box that will only be shown if the checkbox "disease" is checked.
QField supports QGIS's conditional row styling, providing immediate visual feedback when browsing features via list views (such as identify results or relation lists).
You can use expressions to dynamically change the background color, text color, and font properties (italic, underline, strikeout) of individual items in the feature list based on their data.
Note
QField supports full row styling in feature lists.
Workflow
Open your project in QGIS.
Right-click your vector layer in the Layers panel, select Open Attribute Table, and click Conditional Formatting.
Switch to the Full row tab at the top of the Conditional Formatting panel.
Click New Rule.
Enter an evaluation expression (such as "status" IS 'Good').
Configure visual formatting options:
Background color
Text color
Font styles (Italic, Underline, Strikeout)
Click Done to save the rule.
Save your QGIS project and synchronize it to QField.
Attribute fields can have constraints attached.
Constraints are rules in the form of expressions.
Before a feature can be saved all constraints need to be met.
A description can be added that is shown if a constraint is not satisfied.
Configure default values to pre-fill attribute forms when digitizing new features.
Default values remain editable in the form unless fields are locked.
Configuration of a formatted date as default value
Attention
Avoid enabling Apply default value on update for primary key fields.
Use Layer Names rather than Layer IDs when building expressions for QField.
QFieldSync conversion jobs may assign new internal Layer IDs, causing expressions referencing static Layer IDs to fail.
Referencing Layer Names ensures consistent expression evaluation across project exports.
QFieldCloud provides three expression variables for attribute default values and conditional visibility:
@cloud_username: Returns the username of the logged-in QFieldCloud account.
@cloud_useremail: Returns the email address of the logged-in QFieldCloud account.
@cloud_teams: Returns an array of strings representing the team(s) to which the user belongs within the context of the opened cloud project (e.g., ['surveyors', 'inspectors']).
Examples of expression variables:
Insert horizontal accuracy:
@position_horizontal_accuracy
Insert current timestamp:
now()
Insert digitized geometry length:
length($geometry)
Insert custom device variable:
@operator_name
Assign region codes based on spatial intersection: