[Qgis-user] Hide/Show form field depending on precedent field values

Arnaud Vandecasteele arnaud.sig at gmail.com
Fri Jun 11 04:47:18 PDT 2021


Hi Andreas,

Thank you very much.
This was exactly what I was looking for.
As you said, It requires adding a group. This requires an extra step when
you want to control the visibility field by field.
But it works !

Byt the way, I was looking to do this for using this project with the Input
App.
Your solution works as well in Input.

Thanks again,

Arnaud


On Fri, Jun 11, 2021 at 10:09 AM Andreas Neumann <a.neumann at carto.net>
wrote:

> 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
>
>
>

-- 
--------------------------------------------------------------------
Arnaud Vandecasteele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210611/aa2b0427/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/aa2b0427/attachment-0001.png>


More information about the Qgis-user mailing list