Hello,
I’m looking for help with a problem I encountered after QField updated on the 3.3 Version.
In QGIS (3.22.10-Białowieża), I have a point layer with attached pdf-files. The individual document path for each feature is stored in an attribute field which is set to widget type “attachment”. When I export my QGIS Project for QField, I copy the pdf directory and the pointlayer (shp) to my device via QFieldSync. I cannot use the QFieldCloud opion, I only use cable export. Since the document path in the attachment is set to “relative to project path” it works fine that I get a clickable link to my pdf file in the attribute dialogue of the point feature in QField.
Problem:
Since the 3.3 update for QField, I get an automatically generated button “Attach a file” in the attribute field with the attachment.
In my work context, the QField users are not meant to attach a new file in the field. On the contrary, it is important that there are no accidental changes to the original attachment, that I created when setting up the QGIS project. The users simply should be able to access the attached pdf-file through the clickable link. Since the button also overlays the link, it is highly probable that my QField users accidentally click the “Attach a file”-button. I therefore want to completely loose the button.
(Screenshot QField)
Attempts to fix problem:
I tried every setting that I know of to disable this button and to prevent any unwanted changes on the feature attributes.
- In the widget-options, I made the widget non-editable and disabled the checkbox “Display button to open dialog”.
- Additionally I made the whole layer “read-only” in the Data Sources Options in the project properties.
- In the QField export settings I locked the geometries of the layer.
(Screenshot Widget Settings QGIS)
(Screenshot Project Properties)
When looking at the attribute table in QGIS I don’t see any buttons for file attachment and the layer is protected as read-only.
In QField meanwhile, I still have the “Attach a file” button and what’s worse - it still allows the user to alter the attachment that’s linked to the feature eventhough the layer is protected as read-only.
Does anyone know how I can set QField to how it has been before the update, without the dialog-button?
If you need any additional info to help me in this case just let me know.
Thank you very much!
Imported from GitHub discussion by @Rinn37 on 2024-09-12T09:30:04Z