caldera_forms_pre_do_field_magic

Caldera Forms Banner

Runs before field magic tags (%field_slug%) are parsed. If this filter returns anything besides null, all other field magic tag parsing is aborted. Be careful you could end up with one tag changed and no others are parsed.

In this example custom parsing for a Caldera Forms magic tag is used to add line breaks to a multi-select (checkbox) field.

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