<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Arnaud,</p>
<p>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.</p>
<p>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.</p>
<p><img src="cid:7ad50a6ad317c7240821816dc055b443@carto.net" /></p>
<p>Hope this helps,</p>
<p>Andreas</p>
<p id="reply-intro">On 2021-06-11 07:01, Arnaud Vandecasteele wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<div>
<div dir="ltr">
<div>Hi,</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>But how to hide or show a form field depending on whether the user has completed a previous field?</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Arnaud</div>
<div><br />-- <br />
<div class="v1gmail_signature" dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">--------------------------------------------------------------------<br />Arnaud Vandecasteele<br /><br /><br /></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br />Qgis-user mailing list<br /><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</blockquote>
<p><br /></p>

</body></html>