I use Qfield to collect field data and I organized all tabs with Attribute Form. One of the data is to count trees and to multiply the number by 3,27. Everytime I need to use the calculator and write the result in the field by hand (now in Attributes Form the widget type of the field is Range). Is there a way to have the result automatically? Like write the number of trees (example: 14 trees) and have an auto-fill of the field with the result (45.78) using some type of widgets in Attributes Form.

2 Answers 2


If you use a calculated field as Oisin said - and edit the widget properties; enter image description here

When adding a new point in Qfield, you will see the new value:

enter image description here

  • Thank you Aquamarine! Your screenshots has made easier what Oisin said.
    – Lion
    Commented Apr 19, 2022 at 14:59

The easiest way is to create a calculated field in layer_properties. Let's call this calculated field 'result' where result = treecount * 3.27. Then add the field 'result' to your form. Although there is a function called current_value() which supposedly takes the current (unsaved) value of a field from the form, so far I have not managed to get this to work. So following my suggestion, the result won't get populated until you save (close) the form, but when you open the form again, the result will be there.

  • Thank you! It works.
    – Lion
    Commented Apr 19, 2022 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.