Support

Account

Home Forums Backend Issues (wp-admin) Extended select field call threshold Reply To: Extended select field call threshold

  • Hi @niceguys

    If you want to start searching after 3 chars, you can try this code:

    add_action('acf/input/admin_footer', 'my_acf_admin_footer7');
    
    function my_acf_admin_footer7() {
        
        ?>
        <script type="text/javascript">
        (function($) {
    
                acf.add_filter('select2_args', function( args, $select, settings ){
    	
                    args.minimumInputLength = 3;
    
                    // return
                    return args;
                            
                });
            
        })(jQuery);    
        </script>
        <?php    
        
    }

    This page should give you more idea about it: https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/.

    I hope this helps 🙂