/

Layout Rules

Layout Rules help you control how fields behave on custom module forms. You can show or hide fields, enable or disable fields, make fields mandatory, or set field values automatically when specific conditions are met.

Scenario: Zylker uses a custom module called Purchase Requests to track internal procurement needs. Bailey, Zylker’s Procurement Manager, wants the Campaign Name field to appear only when the request is raised by the Marketing team, and the Deal Reference field to become mandatory only when the request is related to Sales. She creates layout rules so the form changes automatically based on the selected department.

Note: Use layout rules when you want to change how fields behave on a form. If you want to restrict the values users can enter, use Validation Rules instead.

Create a Layout Rule

You can create a layout rule by defining a condition and associating one or more actions with it.

  • Go to Settings in 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.

You will be redirected to the layout rule configuration page.

Define Conditions

A condition determines when the layout actions should apply. Each condition can include one or more criteria based on the fields in your custom module.

  • Click New Condition on the layout rule configuration page.
  • Select a Field in the side pane.
  • Select a Comparator.
  • Select or enter a Value.
  • Click Done.

The condition will be added under the When section.

Note: You must configure the first condition before you can add more conditions.

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

If you want to create more than one condition in the same rule, click New Condition again and repeat the steps.

Configure Layout Actions

After you define a condition, you can decide what should happen when the condition is met.

  • Click Layout Actions next to the True label under the condition.
  • Select an Action Type in the side pane.
Action TypeDescription
Show FieldsDisplays the selected fields when the condition is met. If the condition is not met, the fields remain hidden.
Enable FieldsAllows users to edit the selected fields when the condition is met. If the condition is not met, the fields remain disabled.
Set Field ValueAutomatically sets a value for a selected field when the condition is met.
Set Field as MandatoryMakes the selected fields mandatory when the condition is met.
  • Configure the action based on the action type that you selected.
    • For Show Fields, Enable Fields, and Set Field as Mandatory, select the required fields from the Fields dropdown.
    • For Set Field Value, select a Field and then select or enter the Value that should be applied.
  • Click Add Action if you want to associate another action with the same condition.
  • Click Associate.
  • Click Save.

Note: You can associate multiple actions with the same condition. For example, you can show one field and make another field mandatory.

Edit a Layout Rule

You can edit a layout rule when you want to change its conditions or actions.

  • Go to Settings in 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 required layout rule, or click the More icon next to it and select Edit.
  • Make the required changes.
  • Click Save.

To rename the rule, click Edit Layout Rule Details, update the Layout Rule Name, and then click Save.

Mark a Layout Rule as Inactive

You can mark a layout rule as inactive when you do not want it to apply temporarily.

  • Go to Settings in 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 required layout rule.
  • Select Mark as Inactive.

Mark a Layout Rule as Active

You can reactivate an inactive layout rule when you want to use it again.

  • Go to Settings in 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.
  • Select Mark as Active.

Delete a Layout Rule

You can delete a layout rule when you no longer need it.

  • Go to Settings in 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 required layout rule.
  • Select Delete.
  • Click Yes, Delete in the pop-up to confirm your action.