[Qgis-user] Hide/Show form field depending on precedent field values
Andreas Neumann
a.neumann at carto.net
Thu Jun 10 23:09:37 PDT 2021
Hi Arnaud,
You cannot have conditional visibility on a single widget (unless you do
it yourself with Python), but you can have conditional visibility on a
group based on an expression that can reference the value of another
field.
Create a "Group" container in the drag and drop form with the "green
plus" icon. Then click on the group, activate the "Control visibility by
Expression" and enter your expression. The expression needs to return 1
for visible or 0 for not visible.
Hope this helps,
Andreas
On 2021-06-11 07:01, Arnaud Vandecasteele wrote:
> Hi,
>
> When creating a form by drag and drop fields, all fields are displayed
> unless you choose the hidden widget or you remove them from the field.
>
> But how to hide or show a form field depending on whether the user has
> completed a previous field?
>
> Thanks,
>
> Arnaud
>
> --
>
> --------------------------------------------------------------------
> Arnaud Vandecasteele
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210611/a5e37847/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7ad50a6a.png
Type: image/png
Size: 70429 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210611/a5e37847/attachment-0001.png>
More information about the Qgis-user
mailing list