How to create a custom form with ajustable pictures in it? (from reddit)

Hi there everyone,

hope someone here can help, thanks in advance:

I would really love to enhance the experience for some of my collegues for using Qfield for collecting data in the field. Therefore I would like to integrate pictures, depending on the content of a form in QGIS, so that they than can edit the form while at work in qfield.

The main point is that, while collecting data, the user would benefit from the visualisation of his data and might clearly see if there is something wrong. Another benefit is, that in the end of a project I might be able to generate a QGIS-ATLAS that shows all the little pre-designed sketches of each object that was visited in the field together with some of the data, so that it appears to look at the data in categories rather than real life photos.

However I’ve attached a little sketch to show what I mean by this:

  • I only want to show the content inside the blue box
  • all of the symbols/ pictures would be pre-saved on the device of the qfield-user
  • the appearence of the symbols for each data-point should be interchangable, depending on what the user fills out or chooses while collecting the data (sort of “live interchanging of the symbols” while using the form)

Do y’all think this is possible to integrate into a qgis form to use in qfield?
Any advise how to get started?

Thanks again & greetings!!!


Imported from GitHub discussion by @Adr1an113 on 2024-12-16T15:35:50Z

Seems very doable. Use CASE WHEN… THEN… END code to change each picture depending on user’s choice.
What I’m not sure is if pictures change in real time as the user make the choice or if it appears only as soon as the form is completed…
Also, placement of elements might be tricky (to fit as well on QGis as on QField) but should be doable. If hard, you could do two different forms, one dedicated to QGis (to make atlas easier), the other one to QField.


Imported from GitHub comment by @VxTedxV on 2024-12-16T16:07:24Z

You put the pictures in the DCIM folder, you name them somthing like broadleaftree (needs to be the same as the input value of type of tree and in the widgets you go to the settings of the picture attribute and in the default value you write project_folder || ‘DCIM/’ || “type_of_tree”
Don’t forget to check apply default value on update


Imported from GitHub comment by @ThomasDV1984 on 2025-02-16T19:34:25Z