- 10 Jun 2024
- 2 Minutes To Read
-
Print
-
DarkLight
-
PDF
Other Element Is condition as a Visibility Rule
- Updated On 10 Jun 2024
- 2 Minutes To Read
-
Print
-
DarkLight
-
PDF
Introduction
The Other Elements on Page rule can be used when you want to place some content or widget like Self Help, Smart Tip, Beacon, etc. only when a particular element is present or not present on the underlying application. For example, you may want to show a Self Help only when the user is not logged in to the application, in such a case you can use Other Element on Page as a Visibility rule and add the login button as an element. This ensures that the Self Help is only shown when the login button is present on the page.
Different types of operators
The following are different operators used for adding a condition rule for Other Elements on a Page:
- Exists CSS Selector
- Non Exists CSS Selector
- Exists JQuery Selector
- Non Exists JQuery Selector
For more information on the supported operators for Other Element on a Page, see Supported Operators for Visibility and Display Rules.
You can add Other elements on Page as a Display rule and Visibility rule. To know more on the difference between the Display rule and Visibility rule, see Visibility and Display Rule Conditions.
Use Cases
You may want to show a Self Help that would guide a user who has not logged in. After creating the Self Help, set the Visibility rule as Other Elements on the page and select the rule Exists CSS Selector and then add the CSS selector like an ID, class, type, etc. for the login button. This way you can ensure that the Self Help is only shown to a user who has not logged in.
Your application may have standard and premium users where the features of the premium plan differ from the standard plan. You may want to display a Task List only to the premium users with the tasks that will guide them to use the premium features. Using the other element on page as a Visibility rule you can achieve this. Identify an element that is unique to the premium users and add it as rule.
Use the following steps to add Other Elements on Page as a Visibity rule:
-
On the Whatfix Guidance dashboard, click Widgets.
-
Click All widgets.
-
Select the widget to which you want to add the Visibility Rule.
-
Click Set Visibility Rules, and then select Other Elements on Page from the dropdown.
-
Select the rule from the dropdown, and then enter the unique CSS selector or JQuery selector.
-
Click Save.