Title: Bug
Last modified: August 30, 2016

---

# Bug

 *  [Kimberly](https://wordpress.org/support/users/kellogg9/)
 * (@kellogg9)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/bug-115/)
 * **searchform.php**
    Line 12: you forgot to include `id="s"`
 * * You currently have name=”s” which is not correct, or at least not complete (
   doesnt W3C validate).

Viewing 1 replies (of 1 total)

 *  [Free WP TP](https://wordpress.org/support/users/freewptp/)
 * (@freewptp)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/bug-115/#post-6703316)
 * Hi Kimberly,
 * I hope you are well today and thanks for posting here.
 * It’s not actually the bug as the id attribute is not required if the theme is
   developed using HTML5 and we have developed Sparkling theme using HTML5.
 * You can find the default WordPress code to display search form as following in
   this WordPress core file [https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/general-template.php](https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/general-template.php)
 *     ```
       if ( 'html5' == $format ) {
       	                        $form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
       	                                <label>
       	                                        <span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
       	                                        <input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" title="' . esc_attr_x( 'Search for:', 'label' ) . '" />
       	                                </label>
       	                                <input type="submit" class="search-submit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
       	                        </form>';
       	                } else {
       	                        $form = '<form role="search" method="get" id="searchform" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
       	                                <div>
       	                                        <label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
       	                                        <input type="text" value="' . get_search_query() . '" name="s" id="s" />
       	                                        <input type="submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
       	                                </div>
       	                        </form>';
       	                }
       ```
   
 * Best Regards,
    Movin

Viewing 1 replies (of 1 total)

The topic ‘Bug’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/sparkling/2.4.11/screenshot.png)
 * Sparkling
 * [Support Threads](https://wordpress.org/support/theme/sparkling/)
 * [Active Topics](https://wordpress.org/support/theme/sparkling/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/sparkling/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/sparkling/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Free WP TP](https://wordpress.org/support/users/freewptp/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/bug-115/#post-6703316)
 * Status: not resolved