|

srfm_field_classes

Description

Filters the CSS classes applied to a field’s wrapper. Fired from the shared field base in both Free and Pro.

Parameters

  • $default_classes (array) – The default field classes.
  • $args (array) – Context array containing attributes (the field’s block attributes).

Filter Source

PHP
/**
* filter source (Free+Pro) inc/fields/base.php 
*/
$classes = apply_filters( 'srfm_field_classes', $default_classes, [ 'attributes' => $attributes ] );

Filter Usage

PHP
add_filter( 'srfm_field_classes', 'my_callback', 10, 2 ); 
function my_callback( $classes, $args ) { 
return $classes; 
}

Filter Example

PHP
add_filter( 'srfm_field_classes', 'my_callback', 10, 2 ); 
function my_callback( $classes, $args ) { 
return $classes; 
}
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top