[whatwg] [WF3] Web Forms 3.0 Feature List

Matthew Raymond mattraymond at earthlink.net
Fri Feb 23 18:17:30 PST 2007


Mihai Sucan wrote:
> I'm not sure if this is appropriate thread to make a wish, but the subject  
> is "WF3 feature list". Please don't forget about extending <input  
> type=email> to allow a list of multiple emails, comma separated. See my  
> request:
> 
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-January/008986.html

   I presume you mean separated by semicolons, as you would do in
Microsoft Outlook. I think the following is a better idea:

| <p repeat="template" id="row">
|   <label for="emails">To:</label>
|   <input type="email" id="emails" name="emails_[row]">
|   <button type="remove">Delete Email</button>
| </p>
| <p><button type="add" template="row">New Email</button></p>

   Adding and removing semicolon-separated items in a text box is highly
cumbersome. I much prefer something similar to a Thunderbird-style email
address entry, where new rows are added for each email. In fact,
Thunderbird-like email entry is pretty simple to mark up:

| <p repeat="template" id="row">
|   <select id="emailtypes" name="emails_[row]_type">
|     <option value="to">To:</option>
|     <option value="cc">Cc:</option>
|     <option value="bcc">Bcc:</option>
|   </select>
|   <input type="email" id="emails" name="emails_[row]_address">
|   <button type="remove">Delete Email</button>
| </p>
| <p><button type="add" template="row">New Email</button></p>

   Using a single control with semicolon may be cheaper from a markup
standpoint, but when was the last time you saw it used for anything but
email addresses? It's harder to see a specific address, harder to select
and delete it, and if you're using a single-line text box, it's a real
pain to reach an email address on one end of the line or the other.
Plus, as you just illustrated, it may not be clear to the user what
character to use as a separator. Not to mention the fact that the server
has to parse addresses out of a single string when the form is submitted.

   Also, keep in mind that the |type| "email" isn't necessarily just a
text box with an email pattern. It may, for instance, offer
autocompletion based on your address book. Having all emails in a string
with separator characters may limit what features can be offered by user
agents.

   Besides, you can use the |pattern| attribute to accomplish about the
same effect anyways, so there's no real benefit to supporting a new
|type| value.



More information about the whatwg mailing list