This filter lets you change what value will be used to in a calculation field when a specific option of a select, toggle or radio is selected. This overrides the values set in the user interface for select field option calculation value. This filter has 4 parameters:
- $calc_value – This is the value that will be used. The “cost” of this option
- $option – This is an array with the option’s configuration
- $field – This is an array with the field’s configuration
- $form – This is an array with the form’s configuration
This filter was added in Caldera Forms 1.5.1.
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.