Using the Enable-Disable Rule

An enable/disable Rule makes a field editable based on one or more conditions. This is useful for entering optional information or gathering data from only users who fall under a particular group. For example, a campsite or a doctor’s office might ask people to list medications or allergies that might affect treatment. This field is editable only if the user selects Yes.

Continuing this example, assume a registration form with the following fields:

  • Are you taking any medications?: a required single selection field with two options: Yes and No.
  • List all medications: a text field element.

Configure the Enable/Disable Rule:

  1. Click the Rules tab.

  2. Click the Add (Add) button.

  3. Select Are you taking any medications? from the Condition dropdown menu.

  4. Create the condition: Is equal toValueYes.

  5. Select Enable under the Actions dropdown menu.

  6. Select List all medications.

    Create the enable-disable rule based on the condition.

  7. Click Save when finished.

The Enable Rule has been created and users can edit the field only if they have selected Yes. Otherwise, the field is grayed out.

If users select no, the field is disabled.

If the respondents has answered YES, then they are able to edit the field.

If users select yes, the field is enabled.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy