W3C home > Mailing lists > Public > public-html@w3.org > January to March 2007

RE: Brainstorming: more structured form submissions

From: Ben Meadowcroft <ben@benmeadowcroft.com>
Date: Fri, 30 Mar 2007 19:30:20 +0100
To: <public-html@w3.org>
Message-ID: <00cf01c772f9$7e749060$0202a8c0@benspc>

> Ben Meadowcroft wrote:
> > An issue I have often come up against is wanting to provide an 
> > editable grid
> > for form submission. The current model of a name and value 
> pair submission 
> > can be problematic in this situation.
> > 
> > To work around this currently it is common to prefix or 
> suffix a row 
> > identifier to the names of controls with a "row".

> Lachlan Hunt wrote:
> I think the repetition model in Web Forms 2.0 might cover 
> this for you.
> http://www.whatwg.org/specs/web-forms/current-work/#repetitionModel

Thanks for the links, they've been quite useful in reminding myself of these
sections of the WHAT WG work. Yes the repition model does cover doing the
dynamic insertion concept as I mentioned, though I generally do this in a
server side language anyway so the client implementation isn't that
interesting to me (though it obviously will be for others within this
group). However my main point is that of hierarchically strucutred
submission and I feel that my initial example of a grid may have obscured
that issue slightly.

> > I propose that we introduce new enctype value(s) and 
> updated guidance 
> > on user agent processing of form data and name attributes. 
> The goal of 
> > this is to provide support for submission of more structured form 
> > data, e.g. in XML
> WF2 also has support for XML submission.
> http://www.whatwg.org/specs/web-forms/current-work/#x-www-form-xml

One of the examples given there is:

<formdata xmlns="http://n.whatwg.org/formdata">
 <repeat template="row" index="0"/>
 <repeat template="row" index="1"/>
 <field name="name_0" index="0">John Smith</field>
 <field name="count_0" index="0">2</field>
 <field name="name_1" index="0"></field>
 <field name="count_1" index="0">1</field>

This is a good serialisation of the form contents but in terms of how the
server side processing can manipulate this is it offering much in advance of
what can be done with the current form encoding? What I was thinking of was
being able to produce an XML document that is of a more hierarchical nature.
For example the equivalent in my proposal would be something like:

      <name>John Smith</name>

I believe that this structure would make processing simpler for some common
use cases such as processing form submissions via XSLT or binding submitted
date to sever side objects such as JavaBeans.

Ben Meadowcroft
Received on Friday, 30 March 2007 18:30:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 30 March 2007 18:30:43 GMT