How to show or hide booking form content using Answer Rules

With answer rules, you can show hidden text or questions in your space & equipment booking forms based on the user's response to another question. This type of conditional logic allows you to create more dynamic booking forms.

For example, you could add a radio field to your form asking patrons if they need any help setting up the equipment they're booking. If they respond "Yes" to that field, then you could display a hidden text area field asking them to provide details about what they need help with.

When working with answer rules, there are a few things to keep in mind:

  • Although an answer rule can display any field from your Question Bank, answer rules can only be triggered by responses to a Radio or Dropdown field.
  • You can create separate answer rules for each option in a Radio or Dropdown field. For example, Option A could have a rule that displays text, Option B could have a rule that displays another question, and so on.
  • Answer rules are linked to specific fields, not question forms, meaning they'll execute in any form containing the triggering field.
  • If you have a answer rule that is configured to display an additional question, you do not need to add that additional question to your form separately. It will automatically display if the targeted option is chosen by the user. Otherwise, it'll remain hidden from view.

Creating answer rules

As with other Booking Form options, only Admin users can create answer rules. Before you get started:

Once you're ready, here's how you can create a new answer rule:

  1. Log into LibCal and go to Admin > Equipment & Spaces.
  2. Click on the Booking Forms tab.
  3. Scroll down to the Answer Rules panel.
  4. Click on the Add New Answer Rule button.

The Add New Answer Rule button

Add a rule that displays another question

  1. In the the Add Answer Rule window, select the Radio or Dropdown field that will trigger this rule from the Question dropdown.
  2. From the Answer dropdown, select the option from that field which will trigger this rule's action (i.e. what the user must select to display the additional question).
  3. From the Action Type dropdown, select Show Another Question.
  4. From the Question to Show dropdown, select the field from your Question Bank that you want to display when the user selects the targeted answer.
  5. Click the Save button to create your rule.

Answer rule options for showing another question

Add a rule that displays text

  1. In the the Add Answer Rule window, select the Radio or Dropdown field that will trigger this rule from the Question dropdown.
  2. From the Answer dropdown, select the option from that field which will trigger this rule's action (i.e. what the user must select to display the additional question).
  3. From the Action Type dropdown, select Show Text.
  4. In the Text to Show box, enter the text that you want to display when the user selects the targeted answer. You can include simple HTML tags to provide formatting, such as <strong>, <em>, etc.
  5. Click the Save button to create your rule.

Answer rule options for showing text


Managing answer rules

  1. To edit a rule's triggering question and answer, or its action, click on its edit () icon in the Actions column.
  2. To delete a rule, click on its trash can () icon in the Actions column.
    • This will not delete the questions from your Question Bank.
    • If your rule was configured to display text, however, that text will be permanently deleted.

The edit and delete actions for Answer Rules

Related Articles