# Rules Source: [https://docs.virtosoftware.com/docs/virto-form-designer-app/virto-sharepoint-forms-for-office-365-administration-and-usage/rules/](https://docs.virtosoftware.com/docs/virto-form-designer-app/virto-sharepoint-forms-for-office-365-administration-and-usage/rules/) Product: Virto Forms Designer App Updated: 2026-11-24 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](https://docs.virtosoftware.com/docs/virto-form-designer-app/virto-sharepoint-forms-for-office-365-administration-and-usage/classic-and-modern-forms/index.md#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](https://img-docs.virtosoftware.com/wp-content/uploads/2026/11/forms-app-rules-editor_2x-1284x468.png) 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](https://img-docs.virtosoftware.com/wp-content/uploads/2026/11/forms-app-rules-actions_2x-1284x460.png) ## 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](https://docs.virtosoftware.com/docs/virto-form-designer-app/virto-sharepoint-forms-for-office-365-administration-and-usage/permissions/index.md): 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](https://img-docs.virtosoftware.com/wp-content/uploads/2026/11/forms-app-modern-edit-details_2x-2072x496.png) 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.