Show or lock a block with rules
Before you start
Use block rules when a whole section of a formFormThe set of blocks and components people fill in for a module.Open glossary ↗ only matters sometimes. A “Bank details” block can stay hidden until the payment method is a transfer. An “Approval” block can lock once a record is approved. Rules read the values people enter in the form.
Open Block rules
Section titled “Open Block rules”- Open the Forms tab of the module.
- In the header of the block, click the eye icon. The Block rules dialog opens.
- Choose the tab you need: Show when or Lock when.
The dialog starts with a sentence such as “Decide when this block appears and when people can change it. Conditions read the values entered in the form.”
Show a block only when a condition is true
Section titled “Show a block only when a condition is true”On the Show when tab, the lead reads “Show the block when any condition below is true. With no conditions, it is always shown.”
- Click Add condition. A row starts with “If”.
- In Choose a field, pick the field to watch, for example Payment method.
- In Operator, pick one: is, is not, is greater than, is less than or contains.
- Enter the value, for example Bank transfer.
- Add more conditions if you need them. Each new row starts with “or”.
- Click Done, then Save on the form.
The block header now shows a chip, Shown conditionally, with the number of conditions. Click it to reopen the dialog.
Conditions are joined with OR: the block shows when any one of them is true.
Lock a block
Section titled “Lock a block”The Lock when tab has two parts.
Only the creator can edit. A switch. The hint says “Everyone else sees the fields in this block as read-only.” The lock works when someone opens an existing record to edit it. If the signed-in user is not the person who created the record, the fields in the block are read-only. When a record is first added, nothing is locked.
Conditions. “Make the block read-only when any condition below is true.” Add them the same way as in Show when. The block header shows Locked conditionally with the number of conditions, or Creator edits only when the switch is on.
What should I know before I start?
Section titled “What should I know before I start?”- Duplicating a block copies its rules with it.
- Block rules and field conditions are different tools. Block rules work on one block. Field conditions change single fields and can read any field of the form.
Check yourself
What's next
Last checked