[whatwg] Proposal for a combined input control

Hi,
I would like to propose a combined input control. Before I explain what I
mean by this in too great a detail I'll provide a couple of use cases
where it may prove useful:

1. Entering a long number (such as a credit card number)
2. Entering a date

The combined control would essentially be a grouping of "normal" form
controls but logically coupled together and submitting one value when the
form is posted.

An example of the mark-up could be:

<inputgroup name="somedate"
submissionFormat="[somedate_year]-[somedate_month]-[somedate_day]">
   <input type="text" name="somedate_day" maxlength="2" size="2"
pattern="...">
   <select name="somedate_month"><option
value="01">January</option>...</select>
   <input name="somedate_year" type="text" maxlength="4" size="4"
pattern="...">
</inputgroup>

Or

<inputgroup name="somecard">
   <input name="somecard_part1" type="text" maxlength="4" size="4"
pattern="...">
   <input name="somecard_part2" type="text" maxlength="4" size="4"
pattern="...">
   <input name="somecard_part3" type="text" maxlength="4" size="4"
pattern="...">
   <input name="somecard_part4" type="text" maxlength="4" size="4"
pattern="...">
   <input name="somecard_part5" type="text" maxlength="4" size="4"
pattern="...">
</inputgroup>

User agents that understand the web forms mark-up would submit the values
as one combined value (a simple concatenation of the values perhaps). This
submission could be customised to submit the constituent form control
values in a author defined format (the example above is just
illustrative).

This control would be useful for entering long numbers such as credit card
info or serial numbers, input focus could automatically pass to the next
box in the group to speed up data entry. This would also make it easier
for the user to visually chunk long values such as a credit card number to
verify it before submission than entering the data into one single text
input. There would also be convenient hooks for CSS rules as well...

Any comments?

--
Ben Meadowcroft
http://www.benmeadowcroft.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3034 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20040723/39649782/attachment.bin>

Received on Friday, 23 July 2004 10:13:19 UTC