Contact us
View as Markdown
Ask AI

Open this page in an AI assistant with a ready-made prompt.

Opens a third-party service and shares a pre-filled prompt containing this public page URL, its product documentation URL and /llms.txt. No VirtoSoftware account or tenant data is included. Provider terms and privacy policies apply. Verify answers against the linked documentation.

OpenAI terms · OpenAI privacy policy · Anthropic terms · Anthropic privacy policy

Rules

A rule shows, hides, locks or requires a field or a control while another field of the form has a given value. Rules work in the classic and in the modern SharePoint forms, and in the Modern form preview. No code is needed.

Add a rule

  1. Select the field or the control on the form. Tabs and accordions have rules for each section too.
  2. In the Rules section of its properties, press Add a rule.
  3. Choose:
    • Action: Show when, Hide when, Read only when or Required when (fields only);
    • Field: a field that is on the same layout;
    • Condition: equals, does not equal, contains, is empty or is not empty;
    • Value, for equals, does not equal and contains: one of the choices of a choice field, Yes or No for a Yes/No field, or the text to compare with.

A rule on the Laptop model field: Show when Request type equals Hardware

To delete a rule, press Remove the rule (the bin icon next to it).

The four rule actions: Show when, Hide when, Read only when, Required when

How several rules combine

  • With Show when rules, the element is shown only while at least one of them is true.
  • Hide when, Read only when and Required when apply while any of their rules is true.
  • Rules come on top of permissions: an element hidden or read only for a person by its permission stays so whatever the rules say.

Example

In the Service requests list, the Laptop model field has the rule Show when Request type equals Hardware. A person who chooses Software does not see the field; with Hardware, it appears. The Approver comment field has the rule Required when Approval status equals Rejected, so an approver must explain a rejection.

The Details tab of the modern form with the Laptop model field shown for a hardware request

If you remove from the layout the field a rule looks at, the rule shows The field is not on the layout. Add the field back or change the rule.

Rules replace what the classic forms did with JavaScript for showing, hiding and requiring fields. Validation, calculated values and cascading lookups still need JavaScript, which runs in the classic form only.

Updated on November 24, 2026