Issue #13 new

Update searchform.php

Joni Lehto
created an issue

http://wordpress.org/support/topic/theme-elbee-elgee-bp-style-search-box-over-header-image-without-bp?replies=14#post-3062968

Includes the following fixes/features: - Multilanguage support for default search text - Default search text is gray, typed search text is black, clicking in and out (onfocus and onblur) clear or return the default search text and set the appropriate color - Autofill the user-submitted search string with the correct color (black), don't autoclear it on click (correcting typos is easier) - Supports multiple valid search forms on a single page (valid HTML, doesn't break search autocomplete functionality) - Multiple fields get autofilled just like the first one does - Search field now has class="searchfield" for CSS niceness and search autocomplete that both affect all forms

This is ready to be used in 1.3.8.

Comments (10)

  1. Joni Lehto reporter

    One more fix of two parts:

    - Same id numbering is now applied to the <form> for HTML validity and to allow CSS styling all forms differently.

    - A class="searchform" added to the forms, to allow CSS styling all of them similarly.

    While writing this the attachments on the right don't display any timestamp, but the lower one should be the newer.

  2. Joni Lehto reporter

    Three more updates.

    1. When there are multiple search forms but no active search (eg. 404 pages), the initial color of all of them is gray. Previously only the first one was gray, the following ones black. Change done in the first "if" clause.

    2. The input element's name attribute is now always "s" as it used to be. Previous patch erroneously made it be "s1" for the second form on the same page, "s2" on the third form and so forth, which caused search URLs to be /?s1=searchstring instead of /?s=searchstring.

    3. Optional, included only in the file searchform-with-button.php: A search icon that can be clicked to submit the field. Now those without a keyboard or using less-advanced browsers (like still-popular older mobile browsers) can use the search function. The icon and CSS I use are attached. The part of CSS that contains the id declaration #searchform deals with the manually added header search form, normally available in Elbee Elgee only when BuddyPress is installed and then with a different id or class.

  3. Log in to comment