I've done this many times in ArcGIS and ArcPad but I don't even know where to start building a custom form for data entry in QGIS. I would like to do this for field operations--QGIS would make a good field tool with a little customization


Easy as pie.


Basically you create a form with controls that are the same name as your fields that you want to bind the values to, QGIS will take care of the rest.

Also: If you want QGIS to auto map the controls in your custom form correctly you have to set the fields control type in the Field settings of the layar e.g if you have a combo box call TYPE and you want it to fill the combo box with values you already have in the layer you have to set the Field Edit Edit to Unique Values

Edit: Just made another blog post explaining the binding a bit more http://woostuff.wordpress.com/2012/03/30/custom-qgis-feature-forms-value-binding/

enter image description here

| improve this answer | |
  • Excellent walk-through, thanks for sharing. – SaultDon Mar 29 '12 at 1:17
  • 1
    @NathanW The python logic has worked very well for me up until now that i've updated to QGIS 2.6. The user just breezes right through the constraints. Any ideas? – user25976 Jan 22 '15 at 1:13
  • But if i am loading the layer via python how can we call this form ? – Abhijit Gujar Feb 22 '17 at 9:02
  • 1
    Note that the example code in Nathan's excellent tutorial will (unfortunately) no longer work in QGIS 3. – Rostranimin Mar 19 '19 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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