caldera_forms_render_note_classes

Caldera Forms Banner

This filter is useful for adding additional classes to the alerts used by Caldera Forms for success messages or error messages.

This filter exposes an array with a key for each of the types of errors. The classes are in arrays and will be converted to strings later. So changing $classes[ ‘error’ ] to a string with this filter, will cause PHP errors. Instead append or replace that array.

 

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