Top
Action Element conditions as Display Rules
  • 24 Jun 2024
  • 2 Minutes To Read
  • Dark
    Light
  • PDF

Action Element conditions as Display Rules

  • Dark
    Light
  • PDF

Article summary

Introduction

To ensure that performing an action on a particular element triggers the branched Flow, use the Action Element Is or Action Element Text as a Display Rule. This enables you to add identifiers or properties to ensure that the branched Flow starts on the correct element.

The following are the Action Element rules:

Action Element Is (Select Element/CSS Selector/jQuery Selector)
Action Element Text (Select Element/Is, Is One Of)

your title goes here

The Action Element rules are available only under Display Rules for Branching in a Flow.
For more information, see Branching in Flows.

Types of Action Element condition rules

Action Element Is (Select Element/CSS Selector/jQuery Selector)

  • Whatfix enables you to select an element as a Display Rule by using the Select Element option from the dropdown. Clicking this element triggers the branched Flow.
    CLM_Branching DR_Select element

  • Web applications use unique IDs for some elements on the page. Add the unique ID as a CSS Selector/jQuery Selector for the element. This is used when your element needs to be selected from a list of options. For example, a dropdown menu.
    CLM_DR_branching rule_css_jquery

The following are examples of jQuery selectors:

  • $("#firstname"): Selects the element with id="firstname"
  • $(".primary"): Selects the element with class="primary"

The following are examples of CSS selectors:

  • input[title="Search"]: Selects the input element with the title "Search"
  • [id="#analytics-left-pane"]: Selects the element with the id="analytics-left-pane"

Action Element Text (Is/Is One Of)

This is the text that is displayed on the Action Element that is selected. If your application supports multiple languages, choose the Is One Of option and add the name with a comma(,) as a delimiter.
clm_branching DR_action element is

your title goes here

The value is case-sensitive.

Use Cases

Trigger a branched Flow on options inside a dropdown

Consider that you want to trigger a branched Flow on one of the options inside a dropdown. These options have unique identifiers (IDs) as CSS Selectors.

  1. On the Whatfix Studio, select the rule as Action Element Is and CSS Selector.
    clm_branching DR_css selector

  2. Enter the selector.
    clm_branching rules_add css selector

  3. Finish creating the Whatfix content.

Trigger a branched Flow when there are no unique identifiers for the elements

Consider that you want to trigger a branched Flow on buttons, that don't have unique identifiers other than button names. In such a scenario use the Action Element Text to ensure that the branched Flow triggers correctly.

  1. On the Whatfix Studio, select the rule as Action Element Text and Is.
    clm_branching DR_action element text

  2. Enter the button name.
    clm_branching DR_enter text

  3. Finish creating the Whatfix content.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.