Caldera Forms Banner

This filter was added in Caldera Forms 1.4.9

You can use this filter to add a custom class, or modify default classes of one or more rows of a Caldera Forms grid layout.

This filter exposes 3 parameters:

  • $rowClass – This is the class used for the row.
    • Removing what is already set is probably a bad idea. It is strongly recommended that you add to the classes already set.
    • Changing the default classes is likely to have unpleasant effects on how Caldera Forms’ lays out the grid and how conditional logic works.
  • $row – The row number
  • $config – An array of options passed to the Caldera Grid object.
    • Use $config[ ‘form_id’ ] to access the form’s ID.
    • Use $config[ ‘form_id_attr’ ] to access the form’s ID attribute.

Examples Of How To Modify Row Classes In The Caldera Forms Grid

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