I've had some success at creating the drop down lists for attributes in QGIS 3.16 using the Attribute Form option in Layer Properties, as shown here: Creating a multiple select dropdown list in QGIS?
My problem is that whenever I remove the layer and then bring it back into QGIS, my drop down lists are not an option in the attributes. They have gone.
Could anyone give guidance to how to make drop down lists permanent, so when I export a shapefile or bring it back into QGIS, the drop down lists remain?
Best Answer
You will have to save the style for this layer and load it when you will load your shapefile back to your QGIS project.
Layer
->Export
->Save as QGIS Layer Style File
Layer properties
->Symbology
->Layer styling
->Style
->Load Style
Or alternatively
Layer properties
->Symbology
->Layer styling
->Style
->Save as default
->Datasource Database
Just make sure that when saving a style, you also check the
Forms
option. It is checked by default.