Zoho books logo Help Docs

This document was translated using AI to help you access it in your language. For the most accurate information, you may want to refer to the English version or write to us at support@eu.zohobooks.com.

Layout Rules for Custom Modules

With layout rules, you can control which fields are shown or hidden, enabled or disabled, and made mandatory on a custom module’s record form. When a user creates or edits a record, the form changes based on the conditions in your layout rules.

Scenario: Zylker uses a custom module called Purchase Requests to manage procurement across departments. The Marketing team needs a Campaign Name field on the form, while the Sales team needs a Client Name and Deal Reference field. Bailey, Zylker’s Procurement Manager, creates separate layout rules for each department. For the first rule, she sets the condition Department is Marketing to show the Campaign Name field. In the second rule, she sets the condition Department is Sales to show the Client Name field and set Deal Reference as mandatory. Now, when a user selects a department on the form, only the relevant fields are displayed.

Note: This feature is available only for certain plans of Zoho Books. Visit the pricing page to check if it’s available in your current plan.

Create a Layout Rule

You can create a layout rule for a custom module by defining conditions and associating layout actions. Here’s how:

  • Go to Settings on the top right corner of the page.
  • Select the required custom module under Custom Modules.
  • Go to the Rules tab.
  • Select Layout Rules.
  • Click + New Layout Rule in the top right corner.
  • Enter a Layout Rule Name.
  • Click Next.
The New Layout Rule pop-up to enter a name for the layout rule.

You will be redirected to the layout rule configuration page where you can define conditions and configure actions.

Define Conditions

A condition determines when layout actions take effect. Each condition consists of one or more criteria based on the fields in your custom module.

  • Click New Condition on the layout rule configuration page.
  • In the side pane that opens, select a field from the dropdown.
  • Select a comparator (e.g., is, isn’t, is empty, is not empty).
  • Select or enter a value for the condition.
  • Click Done.
The Condition pane to select a field, comparator, and value for the layout rule condition.

The condition will now appear in the When section of the layout rule (e.g., “Department is Sales”).

Note: You must define Condition 1 before you can add additional conditions.

Add multiple criteria within a condition:

If you want the condition to be based on more than one criterion, click Add Criteria in the condition side pane and configure the additional criteria.

Add multiple conditions:

If you want to define additional conditions for the same layout rule, click New Condition and repeat the steps above.

Configure Layout Actions

After defining a condition, you can associate layout actions that apply when the condition is met.

  • Click Layout Actions next to the True label under the condition.
  • In the side pane that opens, select an Action Type from the dropdown:
Action TypeDescription
Show FieldsShows selected fields when the condition is met. If the condition is not met, those fields are hidden.
Enable FieldsEnables selected fields when the condition is met so users can edit them. If the condition is not met, those fields stay disabled.
Set Field ValueAutomatically sets a specific value for a field when the condition is met.
Set Field as MandatoryMakes one or more fields mandatory when the condition is met.
  • Based on the selected action type:
    • For Show Fields, Enable Fields, or Set Field as Mandatory: Select the required fields from the multi-select Fields dropdown.
    • For Set Field Value: Select a Field from the dropdown and enter or select the Value to be set.
  • To add more actions, click Add Action and repeat the steps above.
  • Click Associate.
The Add Layout Actions pane to select an action type and the fields to apply it to.
  • Click Save on the layout rule configuration page.

Note: You can associate multiple actions of different types within the same condition. For example, you can show a field and make another field mandatory when the same condition is met.


Edit a Layout Rule

You can modify the conditions and actions of a layout rule. Here’s how:

  • Go to Settings on the top right corner of the page.
  • Select the required custom module under Custom Modules.
  • Go to the Rules tab.
  • Select Layout Rules.
  • Click the layout rule name you want to edit. Alternatively, click the More icon next to the rule and select Edit.
  • Make the necessary changes to the conditions or actions.
  • Click Save.

To rename the layout rule, click Edit Layout Rule Details on the layout rule configuration page, update the Layout Rule Name, and click Save.

The More Actions dropdown of a layout rule with the Edit option highlighted.

Mark a Layout Rule as Inactive

You can temporarily disable a layout rule by marking it as inactive. An inactive rule will not apply when users create or edit records. Here’s how:

  • Go to Settings on the top right corner of the page.
  • Select the required custom module under Custom Modules.
  • Go to the Rules tab.
  • Select Layout Rules.
  • Click the More icon next to the layout rule you want to disable.
  • Select Mark as Inactive.
The More Actions dropdown of a layout rule with the Mark as Inactive option highlighted.

Mark a Layout Rule as Active

You can re-enable an inactive layout rule by marking it as active. Here’s how:

  • Go to Settings on the top right corner of the page.
  • Select the required custom module under Custom Modules.
  • Go to the Rules tab.
  • Select Layout Rules.
  • Click the More icon next to the inactive layout rule you want to enable.
  • Select Mark as Active.
The More Actions dropdown of an inactive layout rule with the Mark as Active option highlighted.

Delete a Layout Rule

You can permanently delete a layout rule that is no longer needed. Here’s how:

  • Go to Settings on the top right corner of the page.
  • Select the required custom module under Custom Modules.
  • Go to the Rules tab.
  • Select Layout Rules.
  • Click the More icon next to the layout rule you want to delete.
  • Select Delete.
The More Actions dropdown of a layout rule with the Delete option highlighted.
  • Click Yes, Delete in the pop-up to confirm your action.
Was this document helpful?
Yes
No

Thank you for your feedback!