1 Jul 2004 01:11
[whatwg] Web Forms 2.0 (WD 30 June 2004): 'separator' Attribute
Hello WHAT Task Force,
I would like to suggest an additional, optional attribute for the 'form'
element, called 'separator'. It would also be valid for 'input'
elements with a 'type' attribute of either 'submit' or 'image'.
Example usage:
<form action="process-form.py" method="get" separator=";">
'separator' accepts either a semicolon character or an ampersand
character (the default).
The attribute changes the behaviour of forms sent with the
application/x-www-form-urlencoded content type. When 'separator' is set
to ';', a semicolon character rather than an ampersand character is used
to separate name/value pairs as described in Web Forms 2.0 (WD 30 June
2004) Section 5.3, point 5.
In the case where a 'separator' attribute is missing from a submit
button (<input type="submit"> or <input type="image">), then the
equivalent attribute on the form is used instead.
It has no effect on forms submitted by content types other than
application/x-www-form-urlencoded.
The 'separator' attribute is similiar to the 'separator' attribute of
the XForms 1.0 'submission' element, except for the different default
value. (The difference is to ensure backwards compatibility with HTML
forms.) The existence of this attribute would hopefully ease migration
(Continue reading)
I read all your mails, and here's the compromise I think makes most
sense. It is based directly on suggestions made in these threads, so
if it looks familiar, that's why!
If backwards compatibility is not important:
<p>
<label>
Select a breed:
<input type="text" name="breed" data="breeds">
<datalist id="breeds">
<option value="Abyssinian">
<option value="Alpaca">
<!-- ... -->
</datalist>
</label>
</p>
If it is:
<p>
<label>
Select a breed:
<input type="text" name="breed" data="breeds">
</label>
<datalist id="breeds">
<label>
RSS Feed