how to hide default value of serach course box

how to hide default value of serach course box

by Ajeet Kumar -
Number of replies: 3

Hi,

I am trying to customise the course search box in moodle 2.5. I am providing default value in the search box. The code is:

 

$output .= html_writer::empty_tag('input', array('type' => 'text', 'id' => $inputid,
            'size' => $inputsize, 'name' => 'search', 'value' => 'Search Course'));

I want that when user's mouse focus on search box, default value should be hide.. How this functionality will be acheived ?

 

Regards

Ajeet

 

 

 

Average of ratings: -
In reply to Ajeet Kumar

Re: how to hide default value of serach course box

by triveni mergu -
hi ajeet, use placeholder=>'Search Course' , instead of 'value' => 'Search Course'