Home › Forums › Feature Requests › Color Picker Default Value › Reply To: Color Picker Default Value
Hi @cannon303
Hmm.. ACF uses the builtin datepicker in WordPress which is Iris by Automattic.: http://automattic.github.io/Iris/
There’s the palette option which you could use. However (I just noticed this) there is no filter hook for the color pickers options. I’m going to make a feature request for this in the development github repo.. Hopefully Elliot will add this in pretty fast.
In the meantime the only thing I can think of is to reinitialize the colorpicker yourself with a custom script in wp admin.
You can use this snippet for adding inline javascript:
function my_acf_input_admin_footer() {
?>
<script type="text/javascript">
(function($) {
// JS here
})(jQuery);
</script>
<?php
}
add_action('acf/input/admin_footer', 'my_acf_input_admin_footer');
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.