Showing all posts with tag custom-functions (4)

Compare 2 fields

At the time of writing there is no built in way to compare 2 fields with each other. However, since Conditional Fields PRO allows you to define your own functions, you can always resort to a bit of JavaScript in order to create your own custom conditions. Let’s say you want to show a group, … Read More

Show group based on the number of selected checkboxes

Say you have 5 checkboxes and you want some fields to appear when at least 3 are checked? With the free version of Conditional Fields this isn’t possible. But with Conditional Fields Pro you can add a function name as a condition, and depending on whether or not this function returns true, the fields will … Read More

Date range

August 28, 2019

At this point the Conditional Fields plugin is unaware of date ranges, but this is a problem that can be solved with custom functions. Custom functions are available in Conditional Fields Pro. Check out the example below. In order for this form to work you need to add this javascript code to your theme: … Read More

Advanced conditional logic with custom javascript functions

CF7 Conditional Fields PRO 1.6.2 introduces the possibility to write your own JavaScript functions to determine whether or not a group should be shown. In order for the above example to work, you need to create two JavaScript functions – not PHP functions! – called isOlderThan18(field) {} and isYoungerThan18(field) {} in your theme. These functions … Read More