Home › Forums › Front-end Issues › Overwrite core function acf_render_field_wrap › Reply To: Overwrite core function acf_render_field_wrap
Tnx. I was a little afraid it would be done with javascript.
I tried to figure out how (many times) with this tutorial:
https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields
I know how to call javascript to a field but I don’t know what code I should use to add it…
Would it be something like this?
// Customization to datepicker and timepicker
function yl_add_label_class_to_acf_fields() {
?>
<script type="text/javascript">
(function($) {
// Check ACF
if(typeof acf === 'undefined')
return;
// Date picker & Google Maps compatibility
$('.acf-label').addClass('uk-form-label');
})(jQuery);
</script>
<?php
}
add_action('acf/input/admin_footer', 'yl_add_label_class_to_acf_fields');
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.