Skip to content

Numbers

Number fields, both integers and decimal numbers, can be handled by the Range widget that offers two options supported by the mobile app: editable range and slider.

For decimal numbers, it can sometimes be useful to use the Text edit widget.

Widget
Preview in the mobile app
Editable rangeMergin Maps mobile app numeric field form
SliderMergin Maps mobile app slider field form
Decimal numbers - Text editMergin Maps mobile app decimal field form

Example project available

This public project: Mergin Maps Project documentation/form-widgetsdocumentation/form-widgets uses various options for entering numbers. Download or clone it to see this setup.

Prefer a video? Here is a short tutorial about number widgets:

Range

To set up the Editable Range widget:

  1. Right-click on a layer, select Properties and go to the Attributes form tab.

  2. In the list of Available Widgets, select the integer field you want to work with (here: numbers-range-editable).

  3. In the Widget Type tab, select the Range widget with the Editable option.

    If needed, you can define the Minimum, Maximum, and Step values.

    QGIS number editable range field form

    For decimal numbers, the Precision (the number of decimal digits) needs to be specified in the Advanced Options of the widget, so that the Minimum, Maximum, and Step values can be set as decimal numbers.

    QGIS decimal number editable range field form

  4. Apply the changes. Don't forget to save and sync your project!

In the mobile app, the numbers can be entered manually or by using the +/- buttons:

Mergin Maps mobile app number range field form

Slider

To set up the Slider:

  1. Right-click on a layer, select Properties and go to the Attributes form tab.

  2. In the list of Available Widgets, select the numeric field you want to work with (here: numbers-range-slider).

  3. In the Widget Type tab, select the Range widget with the Slider option.

    Set the Minimum, Maximum, and Step values of the slider.

    Recommended slider setup

    Using a slider is most effective when users can easily choose a value. If the range between the minimum and maximum values is too large (and/or the step is is too small), it may be difficult to select a specific value on the slider, leading to issues with the mobile app.

    Therefore we recommend always defining appropriate minimum, maximum, and step values for the slider.

    QGIS number range field form

    For decimal numbers, the Precision (the number of decimal digits) needs to be specified in the Advanced Options of the widget, so that the Minimum, Maximum, and Step values can be set as decimal numbers.

    QGIS decimal number slider field form

  4. Apply the changes. Don't forget to save and sync your project!

In the mobile app, the Slider looks like this. The number can be filled in by moving the slider:

Mergin Maps mobile app number range field form

Text edit

The Text edit widget can be used for a simple entry of a decimal number.

  1. Right-click on a layer, select Properties and go to the Attributes form tab.

  2. In the list of Available Widgets, select the numeric field you want to work with (here: decimal).

  3. In the Widget Type tab, select the Text edit widget.

    QGIS decimal number text edit form

  4. Apply the changes. Don't forget to save and sync your project!

In the mobile app, the Text widget for a decimal number looks like this. The number can be filled in manually using the keyboard:

Mergin Maps mobile app decimal number text edit form