Home › Forums › Front End PM PRO › On text entered, the list is updated
- This topic has 7 replies, 2 voices, and was last updated 7 years, 8 months ago by Shamim Hasan.
- AuthorPosts
- March 28, 2018 at 1:37 pm #12780Edgar PortelliParticipant
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
March 29, 2018 at 12:44 am #12795Shamim HasanKeymasteradd 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 });March 29, 2018 at 4:53 pm #12816Edgar PortelliParticipantThanks mate, is it possible for this to be added when searching for messages as well. It only works when searching for users.
March 29, 2018 at 7:09 pm #12821Shamim HasanKeymasterfor 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 });March 30, 2018 at 1:49 am #12829Edgar PortelliParticipantThat worked as well, but is it possible for the page not to refresh?
March 30, 2018 at 4:19 am #12841Shamim HasanKeymasterNot possible.
March 30, 2018 at 1:46 pm #12853Edgar PortelliParticipantOk no problem but is it possible to increase the speed when the page refreshes, it is really slow.
March 30, 2018 at 3:01 pm #12863Shamim HasanKeymasterIt depends on your website speed, this code has nothing to do with that. It only submit your form without click.
- AuthorPosts
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.