From 37e24e855bb019cc662b52a3e326f6b87e6c0fa7 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 26 Mar 2026 15:03:46 +0100 Subject: [PATCH] conditional logic --- src/layer/conditional-visibility/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layer/conditional-visibility/index.md b/src/layer/conditional-visibility/index.md index 463547ac..2353376d 100644 --- a/src/layer/conditional-visibility/index.md +++ b/src/layer/conditional-visibility/index.md @@ -1,9 +1,9 @@ --- -description: Conditional visibility can be applied to groups and tabs, so that they will be displayed or hidden in the form depending on the value of a field. +description: Conditional logic can be applied to groups and tabs to control their visibility in the form depending on a field value or expression. --- # Conditional Visibility -Conditional visibility can be applied to groups and tabs, so that they will be displayed or hidden depending on the value of a field. +Conditional logic can be applied to groups and tabs, so that they will be displayed or hidden depending on the value of a field. :::tip Example project available You can explore this functionality in . @@ -18,11 +18,11 @@ The form uses the value of the `type` field to display the relevant set of attri To set the visibility of groups in the attributes form: 1. Click on the **roads** group in the **Form Layout** 2. Check the **Control Visibility by Expression** option :heavy_check_mark: -3. Define the expression. Here we use: `"type" = "road"` +3. Define the expression. Here we use: `"type" = 'road'` ![QGIS form control visibility by expression](./qgis-form-conditional-visibility.jpg "QGIS form control visibility by expression") -4. Same steps are used for the **path** group using the expression `"type" = "path"` +4. Same steps are used for the **path** group using the expression `"type" = 'path'` In the , the form displays these groups only when the condition is met. So, there are different sets of attributes depending on the value that is entered in the `type` field.