Search form remove value on click and add the value back on click off

Search form remove value on click and add the value back on click off

, , on June 28, 2012 Add new comment

Search form default value (dissapears on click, appears back on click off).

<input type="text" class="search-input" name="quicksearch" placeholder="Enter your search here">

$(function(){
    // Check for browserSearch form default value (dissapears on click, appears back on click off).


$(function(){
    // Check for browser support of placeholder attribute
    function supports_placeholder() {
        return !!document.createElement('input').placeholder;
    }
    if (!supports_placeholder()) {
        // current browser does not support the placeholder
		Read more »
      

nicer

Style a search form with CSS

, on March 07, 2008 Add new comment

Ok, so i have to add some more focus on the search form on a Simple Machine Forum search form. The users seems not to take into account this option, so as a result a lot of duplicate topics appear daily.

This is how the search form looks right now (it's the default theme with some colors changed).

I want it to be wider as the forum is and with some style applied on it.

First, i will remove the lines (from 298 to 302) regarding the news field, which i will not use from the Themes/default/index.template.php :

	if (!empty($settings['enable_news']))
		echo '
				<td width="90%" class="titlebg2">
					<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
				</td>';

than add to the first td line which include the search form a colspan="2" attribute so it will become

Read more »