Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook allows you to add classes to a radio field container on the .frm_radio div.
Usage
add_filter( 'frm_radio_class', 'add_radio_class', 10, 3 );
Parameters
- $class (string)
- $field (array)
- $field_value (string)
Examples
Add class to radio field
This example adds a class to the .frm_radio div container.
add_filter( 'frm_radio_class', 'add_radio_class', 10, 3 );
function add_radio_class( $class, $field, $field_value ) {
if ( $field['id'] == 5 ) { // change 5 to your field id
$class .= ' add_class_here';
}
return $class;
}