On text entered, the list is updated


Home Forums Front End PM PRO On text entered, the list is updated

This topic is: Not Resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #12780
    Edgar Portelli
    Participant

    Is it possible to update the list of searched users when searching for a user when the text is being inputted instead of pressing the ‘Enter’ button?

    Thank you

    #12795
    Shamim Hasan
    Keymaster

    add following code in your theme’s (child theme’s if any) functions.php

    add_action( 'fep_display_before_directory', function(){
    	?><script type="text/javascript">
    	jQuery(document).ready(function($){
    		var delay = (function(){
    		  var timer = 0;
    		  return function(callback, ms){
    		    clearTimeout (timer);
    		    timer = setTimeout(callback, ms);
    		  };
    		})();
    
    		$('.fep-directory-search-form-field').keyup(function() {
    			delay(function(){
    		      $('#fep-directory-search-form').submit();
    		  }, 1000 );
    		});
    	});
    	</script><?php
    });
    
    #12816
    Edgar Portelli
    Participant

    Thanks mate, is it possible for this to be added when searching for messages as well. It only works when searching for users.

    #12821
    Shamim Hasan
    Keymaster

    for messages, add following code in your theme’s (child theme’s if any) functions.php

    add_action( 'fep_display_before_messagebox', function(){
    	?><script type="text/javascript">
    	jQuery(document).ready(function($){
    		var delay = (function(){
    		  var timer = 0;
    		  return function(callback, ms){
    		    clearTimeout (timer);
    		    timer = setTimeout(callback, ms);
    		  };
    		})();
    
    		$('.fep-messagebox-search-form-field').keyup(function() {
    			delay(function(){
    		      $('#fep-messagebox-search-form').submit();
    		  }, 1000 );
    		});
    	});
    	</script><?php
    });
    
    #12829
    Edgar Portelli
    Participant

    That worked as well, but is it possible for the page not to refresh?

    #12841
    Shamim Hasan
    Keymaster

    Not possible.

    #12853
    Edgar Portelli
    Participant

    Ok no problem but is it possible to increase the speed when the page refreshes, it is really slow.

    #12863
    Shamim Hasan
    Keymaster

    It depends on your website speed, this code has nothing to do with that. It only submit your form without click.

Viewing 8 posts - 1 through 8 (of 8 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.