templates/search/search.php uses incorrect default search term
-
It seems that in Events Manager 5.5.2 templates/search/search.php the default search term label is used incorrectly. The default value is not retrieved from the settings, but straight from the search terms.
$s_default = esc_attr($args['search_term_label']);As a result, an empty string is used as the default value. The onfocus and onblur scripts are also set to act on.
<input type="text" name="em_search" class="em-events-search-text em-search-text" value="" onfocus="if(this.value=='')this.value=''" onblur="if(this.value=='')this.value=''" />After an AJAX search with an empty search text, the default value gets written in to the field. As the onfocus and onblur scripts aren’t affected, they’re still as good as nonexistent: clicking the field doesn’t erase the default value, and emptying the field and clicking outside it doesn’t refill the default value.
In 5.4.4’s templates/events-search.php the default was retrieved from the settings:
$s_default = esc_attr(get_option('dbem_search_form_text_label'));Replacing the line in 5.5.2 with this one resolves the issue.
The topic ‘templates/search/search.php uses incorrect default search term’ is closed to new replies.