I am trying to implement the python code suggested as an answer to this question: QGIS Custom Form: “Other” category in combo box replaced by line edit [closed] I have the same goal as that question: to have an edit widget for data entry that starts as a dropdown menu (using value map) then change to a text line edit if the user selects "Other" from the menu. I am experienced with QGIS but new to python coding.
I put the code in a text editor and saved as FillForm.py. Then it seems I should in the layer properties type into the Init Function line edit: FillForm.formOpen. I went to the layer properties and couldn't find the Init function line edit. What should I do with this code to get QGIS to implement it?
My layer general properties look like this:
There isn't a text line edit called "Init function," so I don't know where to type FillForm.formOpen.
Instead I tried inputting the code as an action.
But when I select "Other" from the dropdown menu for the field "SiteName" it doesn't switch to a text edit line like I wanted it to. Now I have the option to run this action from the Identify Results menu