Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Blank search field


Psytanium

Recommended Posts

Posted

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).

Posted

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.

Posted

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...