Home Forums Front-end Issues If repeater field in functions.php Reply To: If repeater field in functions.php

  • I think I accidentally deleted my response, so here it is again:

    I would use jQuery for this and also add the tab to the field group beforehand. You’ll want to use the acf/input/admin_footer action.

    It would look something like this:

    add_action('acf/input/admin_footer', 'check_for_videos');
    function check_for_videos(){
    var rowCount = jQuery('#acf-group_571814caa0f78 table tbody).find('tr');
    	if(rowCount ==0 ){
    		jQuery('tab field selector here').hide();

    It is sometimes difficult to nail down the exact name to use in the selector. For me it’s a trial and error thing.