Home › Forums › General Issues › Disabling click on Color picker? › Reply To: Disabling click on Color picker?
I honestly cannot tell you if this is possible or not. The color picker is this https://github.com/jquery/jquery-color, the standard wp jquery color picker. If it’s possible it would need to be possible in this plugin. You would need to add custom JS to your site and access the color picker https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/, the color picker args hook is at the end of the page.
If you already have a radio button that allows picking of specific colors, you can alter the radio field to show those colors by including HTML in the “label” portion and then you can add custom CSS to your admin to style that HTML to show the correct color,
or you can even add they styling inline. For example, I used something like this on a site to display a block of color around the label that shows the color being selected.
#f5f5f5 : <span style="display: inline-block; padding: 0 2px; background-color: #f5f5f5; color: #191919;">Light (#f5f5f5)</span>
#191919 : <span style="display: inline-block; padding: 0 2px; background-color: #191919; color: #FFF;">Dark (#191919)</span>
site_colors_company : <span style="display: inline-block; padding: 0 2px; background-color: #006fb6; color: #FFF; font-weight: bold;">company</span>
site_colors_company_2 : <span style="display: inline-block; padding: 0 2px; background-color: #99cc00; color: #FFF; font-weight: bold;">company 2</span>
site_colors_cta : <span style="display: inline-block; padding: 0 2px; background-color: #ff7f00; color: #FFF; font-weight: bold;">CTA</span>
You can probably even do away with the text and just show a block of color, there are a lot of possibilities here.
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.