Home › Forums › Feature Requests › Give "Message" Field Collapsible Function › Reply To: Give "Message" Field Collapsible Function
Hi @pxwee5
You can always use the acf/input/admin_footer hook to add the JS script on the editor page. In that script, you can use the toggle() function to hide the message. Maybe something like this:
add_action('acf/input/admin_footer', 'my_acf_collapse_message');
function my_acf_collapse_message() {
?>
<script type="text/javascript">
(function($) {
$(document).ready(function(){
$(".acf-field-message .acf-label").click(function() {
$( $(this) ).siblings().toggle();
});
});
})(jQuery);
</script>
<?php
}
I hope this helps 🙂
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.