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 filter allows changing the HTML of the option label in the radio or checkbox field.
Usage
add_filter('frm_choice_field_option_label', 'my_custom_function', 10, 2);
Parameters
- $label (string): The HTML of label.
- $args (array): Includes field.
Examples
Wrap the label in a div
add_filter('frm_choice_field_option_label', 'frm_wrap_choice_option_label', 10, 2);
function frm_wrap_choice_option_label( $label, $args ) {
return '<div class="your-custom-class">' . $label . '</div>';
}