The conditional visibility of a calculator’s elements lets you both hide or reveal specific input fields or calculator components, depending on the results or values entered into other input fields.
Written by Abdul Samad
Conditional visibility is a powerful feature in ActiveCalculator that allows you to hide or reveal specific input fields or calculator components based on the results or values entered into other input fields. When a condition for a specific field is true, the field becomes visible; if not, it remains hidden. This feature enables you to create dynamic and interactive calculators that adapt to user inputs.
Before we dive into setting up conditional visibility, let's assume your calculator consists of the following elements:
In this example, we want to show the range slider only when the number entered in the numeric input field is greater than 10.

Follow these steps to set up conditional visibility for the range slider:






@NumberField > 10

This formula checks if the value entered in the numeric input field (assuming its ID is "NumberField") is greater than 10.



That's it! Your visibility rule for the slider is now set. It reads: show the slider when the number entered in the input field (with ID "NumberField") is greater than 10.
You can set more visibility rules for the same input field by modifying the formula for your custom variable. For example, you can combine multiple conditions using logical operators like AND (and) or OR (or).
@NumberField > 10 and @NumberField < 20
This formula will show the slider only when the number entered is between 10 and 20 (exclusive).
Click the "Preview" button to see the calculator in action. Enter a number less than 10 in the numeric input field to hide the range slider. Then, enter a number greater than 10 to reveal the range slider.



Q: The conditional visibility is not working as expected. What could be the issue? A: Double-check your custom variable formula to ensure it's correct. Also, verify that you've selected the right variable in the "Setting conditional visibility" section.
Q: Can I set up conditional visibility for multiple elements based on the same input field? A: Yes, you can create multiple custom variables with different formulas and assign them to different elements to control their visibility based on the same input field.
Did this answer your question?