Hello @andriiwork
You could try to use this hook:
add_filter( 'um_field_extra_atts', 'um_add_field_class', 10, 3 );
function um_add_field_class( $field_atts, $key, $data ) {
$field_atts['class'][] = 'your_class';
return $field_atts;
}
Regards.
Hello. @andrewshu
This snippet work. Thanks.
But I have small problem.
This snippet add my custom class to all fields =( (And add to <DIV> class not to <INPUT>)
add_filter( 'um_field_extra_atts', 'um_add_field_class', 10, 3 );
function um_add_field_class( $field_atts, $key, $data ) {
$field_atts['class']['test_meta_key9'] = 'wpdatepicker';
return $field_atts;
}
-
This reply was modified 2 years, 9 months ago by
Yui.
-
This reply was modified 2 years, 9 months ago by
andriiwork.
-
This reply was modified 2 years, 9 months ago by
andriiwork.
-
This reply was modified 2 years, 9 months ago by
andriiwork.