Support

Account

Home Forums Feature Requests Flexible content fields – global expand and collapse Reply To: Flexible content fields – global expand and collapse

  • Hi @cbratschi

    I believe you can try this code:

    function my_acf_admin_head() {
    	?>
    	<script type="text/javascript">
    	(function($){
    
    		$(document).ready(function(){
                
                $( ".-collapse" ).each(function( index ) {
                  $( this ).click();
                });
                
            });
    
    	})(jQuery);
    	</script>
    	<?php
    }
    
    add_action('acf/input/admin_head', 'my_acf_admin_head');

    Please check this page to learn more about it: https://www.advancedcustomfields.com/resources/acfinputadmin_head/.

    Thanks!