caldera_forms_checkbox_calculate_sum

The Catdera mascot for Caldera Labs playing with the Caldera globe logo

By default, when checkbox fields are used in a calculation field, the sum of all checked options is added to the calculation. Using this filter, the highest value checked option will be used.

For example, if you had a checkbox field that had options with the values of 2 and 4, and both were selected, without this filter, 6 would be added to the calculation. With it, 4 would be added.

This filter was added in Caldera Forms 1.5.0.10.

Where Does This Code Go?

When using WordPress hooks to customize Caldera Forms or other plugins you should not modify the plugin files, or you will lose your changes when you update the plugin. Instead you should create a small plugin to hold the custom code. It's easy, learn how here.

Technically you can add the custom code to your theme's functions.php, but then you will not be able to change your theme and keep these customizations.

Learn More