Adding combo box to QGIS attributes form The Next CEO of Stack OverflowConnect not working for custom QGIS formQGIS custom form and autocompleted data entering with “validation check”QGIS Fill Ring tool problemPyQGIS: Editable Combobox for Value Map widget issesQGIS 2.0: Date Field for Custom Feature FormHow to store attribute values from a custom form into shapefile?How to Format QGIS Field names on Editor FormQGIS default value form slowAdding image in Feature Attributes Form in QGIS?How to get the selected value in a value map with Function Editor in QGIS 3.0.2?

Why is my new battery behaving weirdly?

What is the value of α and β in a triangle?

Recycling old answers

Won the lottery - how do I keep the money?

Prepend last line of stdin to entire stdin

Plot of histogram similar to output from @risk

RigExpert AA-35 - Interpreting The Information

Should I tutor a student who I know has cheated on their homework?

How do I align (1) and (2)?

Powershell. How to parse gci Name?

Is it okay to majorly distort historical facts while writing a fiction story?

How to scale a tikZ image which is within a figure environment

Does it make sense to invest money on space investigation?

Why didn't Khan get resurrected in the Genesis Explosion?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

Is there a way to save my career from absolute disaster?

What did we know about the Kessel run before the prequels?

What was the first Unix version to run on a microcomputer?

Easy to read palindrome checker

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Why isn't acceleration always zero whenever velocity is zero, such as the moment a ball bounces off a wall?

Can MTA send mail via a relay without being told so?

How to place nodes around a circle from some initial angle?

Are police here, aren't itthey?



Adding combo box to QGIS attributes form



The Next CEO of Stack OverflowConnect not working for custom QGIS formQGIS custom form and autocompleted data entering with “validation check”QGIS Fill Ring tool problemPyQGIS: Editable Combobox for Value Map widget issesQGIS 2.0: Date Field for Custom Feature FormHow to store attribute values from a custom form into shapefile?How to Format QGIS Field names on Editor FormQGIS default value form slowAdding image in Feature Attributes Form in QGIS?How to get the selected value in a value map with Function Editor in QGIS 3.0.2?










1















I want to customize attributes form in QGIS 3.6 with a combo box which will fill with a predefined value.



I found on the web examples but with the version 2.x or with Python code. This last solution doesn't seem to work very fine.



Is there a simple way to associate a field with a combo box?










share|improve this question









New contributor




vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    1















    I want to customize attributes form in QGIS 3.6 with a combo box which will fill with a predefined value.



    I found on the web examples but with the version 2.x or with Python code. This last solution doesn't seem to work very fine.



    Is there a simple way to associate a field with a combo box?










    share|improve this question









    New contributor




    vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      1












      1








      1








      I want to customize attributes form in QGIS 3.6 with a combo box which will fill with a predefined value.



      I found on the web examples but with the version 2.x or with Python code. This last solution doesn't seem to work very fine.



      Is there a simple way to associate a field with a combo box?










      share|improve this question









      New contributor




      vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I want to customize attributes form in QGIS 3.6 with a combo box which will fill with a predefined value.



      I found on the web examples but with the version 2.x or with Python code. This last solution doesn't seem to work very fine.



      Is there a simple way to associate a field with a combo box?







      qgis qgis-3 forms






      share|improve this question









      New contributor




      vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited yesterday









      Taras

      2,3283727




      2,3283727






      New contributor




      vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      vcloarecvcloarec

      82




      82




      New contributor




      vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      vcloarec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes


















          1














          A simple way to do this is to use the Value Map widget type.
          Open the layer properties dialog for the layer you are working on and click on the Form tab on the left hand side. Select the field which you want to associate with the combo box and change the widget type to value map.
          You can either populate the combo box with values from a field in any layer loaded in the layers panel, or from a saved csv file. Now, with the layer in edit mode, the edit widget for the chosen field in the feature form will be a combo box populated with your custom values. See screenshots below of layer properties settings and resulting feature form.



          enter image description here



          enter image description here



          If you want take it a step further, you can create a ui file in Qt Designer and use this as your feature editing form. The trick is to make sure that, in Designer, you give your widget objects exactly the same name as the fields to which you want to bind them. Save the ui file in the same directory as your QGIS project file. Then go back into the Form tab in layer properties; change the Attribute layout editor from Autogenerate to Provide ui-file, then under Edit UI, load the ui file by browsing to its location. See screenshot below:



          enter image description here



          With this workflow, you have a lot more control over feature editing- for example you can include widgets for only a subset of fields (if you want to limit or simplify editing for users) and you have more options for customizing widget types.



          In the example below, I have a layer of plant records and have created a ui form with edit widgets for four fields. For Taxon_Name I am using the value map widget type with a combo box which is populated from values in a csv layer.



          enter image description here



          enter image description here






          share|improve this answer























          • Thanks a lot for your very detailed answer !

            – vcloarec
            yesterday











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "79"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          vcloarec is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317093%2fadding-combo-box-to-qgis-attributes-form%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          A simple way to do this is to use the Value Map widget type.
          Open the layer properties dialog for the layer you are working on and click on the Form tab on the left hand side. Select the field which you want to associate with the combo box and change the widget type to value map.
          You can either populate the combo box with values from a field in any layer loaded in the layers panel, or from a saved csv file. Now, with the layer in edit mode, the edit widget for the chosen field in the feature form will be a combo box populated with your custom values. See screenshots below of layer properties settings and resulting feature form.



          enter image description here



          enter image description here



          If you want take it a step further, you can create a ui file in Qt Designer and use this as your feature editing form. The trick is to make sure that, in Designer, you give your widget objects exactly the same name as the fields to which you want to bind them. Save the ui file in the same directory as your QGIS project file. Then go back into the Form tab in layer properties; change the Attribute layout editor from Autogenerate to Provide ui-file, then under Edit UI, load the ui file by browsing to its location. See screenshot below:



          enter image description here



          With this workflow, you have a lot more control over feature editing- for example you can include widgets for only a subset of fields (if you want to limit or simplify editing for users) and you have more options for customizing widget types.



          In the example below, I have a layer of plant records and have created a ui form with edit widgets for four fields. For Taxon_Name I am using the value map widget type with a combo box which is populated from values in a csv layer.



          enter image description here



          enter image description here






          share|improve this answer























          • Thanks a lot for your very detailed answer !

            – vcloarec
            yesterday















          1














          A simple way to do this is to use the Value Map widget type.
          Open the layer properties dialog for the layer you are working on and click on the Form tab on the left hand side. Select the field which you want to associate with the combo box and change the widget type to value map.
          You can either populate the combo box with values from a field in any layer loaded in the layers panel, or from a saved csv file. Now, with the layer in edit mode, the edit widget for the chosen field in the feature form will be a combo box populated with your custom values. See screenshots below of layer properties settings and resulting feature form.



          enter image description here



          enter image description here



          If you want take it a step further, you can create a ui file in Qt Designer and use this as your feature editing form. The trick is to make sure that, in Designer, you give your widget objects exactly the same name as the fields to which you want to bind them. Save the ui file in the same directory as your QGIS project file. Then go back into the Form tab in layer properties; change the Attribute layout editor from Autogenerate to Provide ui-file, then under Edit UI, load the ui file by browsing to its location. See screenshot below:



          enter image description here



          With this workflow, you have a lot more control over feature editing- for example you can include widgets for only a subset of fields (if you want to limit or simplify editing for users) and you have more options for customizing widget types.



          In the example below, I have a layer of plant records and have created a ui form with edit widgets for four fields. For Taxon_Name I am using the value map widget type with a combo box which is populated from values in a csv layer.



          enter image description here



          enter image description here






          share|improve this answer























          • Thanks a lot for your very detailed answer !

            – vcloarec
            yesterday













          1












          1








          1







          A simple way to do this is to use the Value Map widget type.
          Open the layer properties dialog for the layer you are working on and click on the Form tab on the left hand side. Select the field which you want to associate with the combo box and change the widget type to value map.
          You can either populate the combo box with values from a field in any layer loaded in the layers panel, or from a saved csv file. Now, with the layer in edit mode, the edit widget for the chosen field in the feature form will be a combo box populated with your custom values. See screenshots below of layer properties settings and resulting feature form.



          enter image description here



          enter image description here



          If you want take it a step further, you can create a ui file in Qt Designer and use this as your feature editing form. The trick is to make sure that, in Designer, you give your widget objects exactly the same name as the fields to which you want to bind them. Save the ui file in the same directory as your QGIS project file. Then go back into the Form tab in layer properties; change the Attribute layout editor from Autogenerate to Provide ui-file, then under Edit UI, load the ui file by browsing to its location. See screenshot below:



          enter image description here



          With this workflow, you have a lot more control over feature editing- for example you can include widgets for only a subset of fields (if you want to limit or simplify editing for users) and you have more options for customizing widget types.



          In the example below, I have a layer of plant records and have created a ui form with edit widgets for four fields. For Taxon_Name I am using the value map widget type with a combo box which is populated from values in a csv layer.



          enter image description here



          enter image description here






          share|improve this answer













          A simple way to do this is to use the Value Map widget type.
          Open the layer properties dialog for the layer you are working on and click on the Form tab on the left hand side. Select the field which you want to associate with the combo box and change the widget type to value map.
          You can either populate the combo box with values from a field in any layer loaded in the layers panel, or from a saved csv file. Now, with the layer in edit mode, the edit widget for the chosen field in the feature form will be a combo box populated with your custom values. See screenshots below of layer properties settings and resulting feature form.



          enter image description here



          enter image description here



          If you want take it a step further, you can create a ui file in Qt Designer and use this as your feature editing form. The trick is to make sure that, in Designer, you give your widget objects exactly the same name as the fields to which you want to bind them. Save the ui file in the same directory as your QGIS project file. Then go back into the Form tab in layer properties; change the Attribute layout editor from Autogenerate to Provide ui-file, then under Edit UI, load the ui file by browsing to its location. See screenshot below:



          enter image description here



          With this workflow, you have a lot more control over feature editing- for example you can include widgets for only a subset of fields (if you want to limit or simplify editing for users) and you have more options for customizing widget types.



          In the example below, I have a layer of plant records and have created a ui form with edit widgets for four fields. For Taxon_Name I am using the value map widget type with a combo box which is populated from values in a csv layer.



          enter image description here



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          Ben WBen W

          1,3531310




          1,3531310












          • Thanks a lot for your very detailed answer !

            – vcloarec
            yesterday

















          • Thanks a lot for your very detailed answer !

            – vcloarec
            yesterday
















          Thanks a lot for your very detailed answer !

          – vcloarec
          yesterday





          Thanks a lot for your very detailed answer !

          – vcloarec
          yesterday










          vcloarec is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          vcloarec is a new contributor. Be nice, and check out our Code of Conduct.












          vcloarec is a new contributor. Be nice, and check out our Code of Conduct.











          vcloarec is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317093%2fadding-combo-box-to-qgis-attributes-form%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          រឿង រ៉ូមេអូ និង ហ្ស៊ុយលីយេ សង្ខេបរឿង តួអង្គ បញ្ជីណែនាំ

          QGIS export composer to PDF scale the map [closed] Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Print Composer QGIS 2.6, how to export image?QGIS 2.8.1 print composer won't export all OpenCycleMap base layer tilesSave Print/Map QGIS composer view as PNG/PDF using Python (without changing anything in visible layout)?Export QGIS Print Composer PDF with searchable text labelsQGIS Print Composer does not change from landscape to portrait orientation?How can I avoid map size and scale changes in print composer?Fuzzy PDF export in QGIS running on macSierra OSExport the legend into its 100% size using Print ComposerScale-dependent rendering in QGIS PDF output

          PDF-ში გადმოწერა სანავიგაციო მენიუproject page