#21984 closed defect (bug) (invalid)
Adding a placeholder to searchform.php breaks form submission.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.4.2 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Without a placeholder attibute, the form submits successfully ("?s=[search-term]"):
<form role="search" method="get" id="searchform" action="<?php bloginfo('url');?>/">
<div>
<label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="" name="s" id="s">
<input type="submit" id="searchsubmit" value="Search">
</div>
</form>
With a placeholder attibute, however, the form submits blank ("?s=") regardless of the presence of the value attribute:
<form role="search" method="get" id="searchform" action="<?php bloginfo('url');?>/">
<div>
<label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="" placeholder="Search" name="s" id="s">
<input type="submit" id="searchsubmit" value="Search">
</div>
</form>
This is a bug on all modern browsers (legacy is excluded because the placeholder attribute is not supported).
Change History (4)
Well, it works in 3.4.1. How is this not a WP bug?
Version 0, edited 8 months ago
by mwilliam
(next)
Note: See
TracTickets for help on using
tickets.

Not sure I see how this is a WordPress bug?