Home › Forums › Feature Requests › Field label – Show/hide option › Reply To: Field label – Show/hide option
I recently had issues making this work on some fields because their keys were formatted a little differently, causing the substr
call to get the wrong value. You may be able to solve for this by working from the end of the field ID string rather than the beginning.
substr($field['key'],-13)
Of course, this is similarly (if not more) brittle, as it still depends on the format of ACF’s field IDs being consistent. Consider printing out your field IDs to take a look at them if you’re having trouble, and adjust accordingly.
I definitely vote for this to be a first-class feature of the plugin—it’s much less confusing than just leaving the label field blank!
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?
— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.