Psytanium Posted December 23, 2013 Posted December 23, 2013 Hey fellas, someone know a trick to turn the blank search field to ? im looking to list all the products in case the user pressed search without typing anything (instead of listing nothing).
Psytanium Posted December 23, 2013 Author Posted December 23, 2013 this is the search input field <input type=text name="keywords" class="go" value="<?php echo TEXT_INPUT_SEARCH?>" onblur="if(this.value=='') this.value='<?php echo TEXT_INPUT_SEARCH?>'" onfocus="if(this.value =='<?php echo TEXT_INPUT_SEARCH?>' ) this.value=''"> I tried the placeholder attribute, but in presence of Value placeholder don't have effect.
Psytanium Posted December 23, 2013 Author Posted December 23, 2013 found it, in advanced_search_results.php ive insert this : if(isset($_GET['keywords']) == 'By keywords'){ $_GET['keywords'] = ' '; } 'By keyword' is TEXT_INPUT_SEARCH in language files.
Psytanium Posted December 23, 2013 Author Posted December 23, 2013 this is the correct code if($_GET['keywords'] == 'By keywords'){ $_GET['keywords'] = ' '; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.