Support

Account

Home Forums ACF PRO Override back-end labels ? Reply To: Override back-end labels ?

  • Hi @beee

    You should be able to do it like this:

    add_action('acf/input/admin_footer', 'my_acf_change_repeater_label2');
    
    function my_acf_change_repeater_label2() {
        
        ?>
        <script type="text/javascript">
        (function($) {
            $(document).ready(function(){
                
                var currentDay = "Monday";
                // Replace the label
                $(".acf-field-123456789abc label").each(function(i){
                    switch(i) {
                        case 1:
                            currentDay = "Tuesday";
                            break;
                        case 2:
                            currentDay = "Wednesday";
                            break;
                    }
                    
                    $(this).text(currentDay);
                });
                
            });
        })(jQuery);    
        </script>
        <?php    
        
    }

    Because this is more related to jQuery, kindly visit its community for better support.

    I hope this helps 🙂