I am working on a pyqgis script where I allow the user to add features using the addfeature map tool, where the user can create the geometry of the feature by clicking on the canvas, and after the geometry has been created, the user will be prompt up with a table where he can enter the attributes of the feature.
The question is, some attributes of the feature should be pre-defined, and some can be entered by the user. I found out that by using following code I can suppress the prompt.
But I still want the user to be able to enter most of the attributes after the new feature has been added, so it is not a good solution.
Is there another way where I can define some attributes after the feature has been added, and then prompt the table? In that way, the pre-defined value should be shown in the table when it is opened, so the user does not have to give value to them again.