It is currently Wed May 22, 2013 2:00 am
Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.
I don't know a way in HTML to clear a field among several in a form that is not by scripts.
One suggestion to solve this is adding the FOR="id" attribute (as in LABEL element) within the element INPUT TYPE=RESET in order to remove only the information from a single field.
On this exemple, the reset button only clear the filter input:
Product: <input type="text" name="product" id="product" /><br />
Search Filter: <input type="text" name="filter" id="filter" />
<input type="reset" for="filter" value="X"><br />
<input type="submit" value="Submit">
- Posts: 1
- Joined: Fri Jun 29, 2012 3:31 pm
- Location: Brazil.
Isn't it better to let the browser provide a convenient way for the user to clear the field? A separate button might not be especially convenient for the user, e.g. on a touch device with on-screen keyboard, the user would have to remove focus from the filter field and click on your X button and then go back to the filter field. The browser can provide an X button in the on-screen keyboard so the user doesn't have to close the keyboard to clear the field.
- Posts: 795
- Joined: Tue Feb 06, 2007 8:29 pm
- Location: Sweden
Return to Feedback on the Specs
Who is online
Users browsing this forum: No registered users and 1 guest