QField icon indicating copy to clipboard operation
QField copied to clipboard

Custom scripted form

Open AbelToy opened this issue 8 years ago • 8 comments

Hello,

We need to use a custom form that has more features than just what the default forms support. We solve that on Desktop by using a custom ui file and a python file that can add some extra functionality

Is there any way to do that on QField? I imagine it doesn't support running custom python code, but is there any scripting language I could use? Any plugin support?

My last alternative would be to fork the repository and make a custom build with our custom forms

Cheers, Abel Toy

AbelToy avatar Jul 05 '17 12:07 AbelToy

There is an idea to integrate qml/js based forms as a replacement for ui/py based forms. So far we are still looking for a project where this is required, that's why we have nothing like that implemented yet. Improvements in this area would be very welcome.

m-kuhn avatar Jul 05 '17 14:07 m-kuhn

Abel are working with me in a project. We have some hours (20-30 aprox.) to improve QField, not much, but Abel can spent this hours to improve these custom forms. We've develop 2 custom form (ui/py) for QGIS and we want to see the same forms in QField.

Can you help us to continue this work?

Thanks in advance.

See you in Nodebo!

carlospsig avatar Jul 05 '17 15:07 carlospsig

Great that you have some time to work on QField.

To make this work generic, the main questions are how to deploy those files, how configuration happens and what exactly the requirements are (Is it just required to make dynamic changes to widgets or are there other API calls required).

This kind of functionality will be really good to have in QField.

Booking to Nodebo soon, looking forward to seeing you there :)

m-kuhn avatar Jul 06 '17 10:07 m-kuhn

Any update on this point ? Running custom scripts would be super usefull...

henricazottes avatar Jun 11 '19 09:06 henricazottes

Not yet. But I agree it would be nice :slightly_smiling_face:

signedav avatar Nov 18 '19 14:11 signedav

The enhancement request has not been done, but dropping a note to inspire others: feature form's QML widgets can do wonder on that front. We recently used QML widgets to provide a live "board" buses arrival times attached to point features and it worked wonders.

nirvn avatar Sep 11 '25 11:09 nirvn

I'm sure that work from each one of you should be shared to the community to inspire users even more ! 😉

VxTedxV avatar Sep 13 '25 11:09 VxTedxV

For those interested in the arrival times board I mentioned above, it looks like this:

Image

The QGIS project itself can be downloaded here (https://github.com/opengisch/qfield.org/blob/main/conferences-projects/uc2025.zip). The project showcases quite a few cool functionalities, including QML widgets embedded within feature forms as well as QField project plugins.

For the QML widget, the script is available through the 'stops' vector layer properties dialog's attribute form panel. From there, you can double click on the 'Departures board' item in the feature form's drag and drop list:

Image

nirvn avatar Sep 16 '25 03:09 nirvn