Condition Actions
Last updated
Last updated
You can choose actions after you set up condition options and values. Let's take the Veterinary Appointment Booking calculator. So if you choose the "is selected" condition, "Dermatology" from the value and "show" from the option.
The calculator will open up the Dermatologist field so that users can choose their dermatologist.
There are these actions available to choose from:
*Hide - This will hide the chosen value if users choose this option.
*Show - This action will show the element if it is hidden.
Hide (leave in total) - This action will hide the value but leave it in the total for users.
Unset - This action will reset the predefined settings if the condition is met.
Disable - Enable this and users will not be able to choose if the condition is met.
Set value - This action allows you to set up another default value if the condition is met.
Set value and disable - This will set up another default value and users will not be able to change it.
Select option - This action will let you choose the option of the field when the condition is met.
Select option and disable - This will set up another default option and users will not be able to change it.
Set date - This action allows you to set up another default date if the condition is met.
Set date and disable - This will set up another default date and users will not be able to change it.
Set period - This will set up another date range if the condition is met.
Set period and disable - This will set up another date range and users will not be able to change it.
Set time - This will set another time if the condition is met.
Set time and disable - This will set up another time and users will not be able to change it.
*when dealing with 'Hide' and 'Show' actions, it is important to be familiar with the related settings in the element settings:
On the Settings tab of the elements you can find the setting 'Hidden by default':
If enabled, the element will be hidden in the calculator and its value will be counted as zero in formula fields. By utilizing the conditional system of the Cost Calculator, you can make the element visible again if it meets the specified condition by using the 'Show' action:
The result on the front-end:
On the Settings tab of the elements you can find the setting 'Calculate hidden by default':
If any case hides the element: via the 'Hidden by Default' setting or by 'Hide' action, the element's default value (if it is set) will be counted in the formula. If the setting is disabled, regardless of its value, in formulas it will be counted as zero:
Make sure that you are using logically correct conditions and choosing the proper elements for them.