Question regarding search page form
-
I just have a small question regarding my searchform.php file below:
<div class="searchform"> <?php $search_text = "Search the website"; ?> <form method="get" class="searchform" action="<?php bloginfo('home'); ?>/"> <input type="text" value="<?php echo $search_text; ?>" name="s" id="s" onblur="if (this.value == '') {this.value = '<?php echo $search_text; ?>';}" onfocus="if (this.value == '<?php echo $search_text; ?>') {this.value = '';}" /> <input type="submit" id="searchsubmit" value="Search" /> </form> </div>
The $search_text string seems to only work with the onblur and onfocus when the text is longer than two words. I just want Search website. Is this possible?
- The topic ‘Question regarding search page form’ is closed to new replies.