Description
Field Visiblity Condition extends the BackdropCMS block visibility condition to set a condition based on the selected fields data.
This makes it possilble to show or hide another block or even a layout, based on the value of a particular field.
How to install
Install this module using the official Backdrop CMS instructions at https://backdropcms.org/guide/modules
Usage
This module will add a new Visibility Condition called 'Field value' which provides access to an entity field value.
Layouts:
- Navigate to your layout of choice and click the 'Configure Layout' tab.
- Scroll down to 'Visibility conditions'
- Click '+ Add visibility condition'
- In the dropdown, choose 'Field value'
- Select the field you want to use as the validation target
- Choose which data you want to use as the validation data or add a checkmark in the 'NOT' box to show if it doesn't validate
- Click the 'Add Visibility Condition' button
- Click the 'Save Layout' button
- Test and make sure it works the way you expect
Blocks:
- Navigate to your layout of choice
- On the 'Manage Blocks' tab, find the block you want to show or hide and click 'Configure'
- Click on the 'Visibility condition' link to open it
- Click '+ Add visibility condition'
- Choose 'Field value' from the dropdown
- Select the field you want to use as the validation target
- Choose which data you want to use as the validation data or add a checkmark in the 'NOT' box to show if it doesn't validate
- Click the 'Add Visibility Condition' button
- Click the 'Update Block' button
- Click the 'Save Layout' button
- Test and make sure it works the way you expect
License
This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.
CURRENT MAINTAINERS
- Tim Erickson (https://github.com/stpaultim)
- Openings available....
Credits
Originally developed for Backdrop by @docwilmot