[whatwg] Publishing another Web Forms 2 Call For Comments soon

Olav Junker Kjær olav at olav.dk
Sat Jan 22 16:34:06 PST 2005


Ian Hickson wrote:
> I have seen, and used, forms where the author had one form per row, 
> hacked using <form> elements in invalid places. There are cases where that 
> is the UI that people want.

Agreed, although its not an UI issue whether there is one form pr row or 
one form containing the whole table. This is transparent to the user. 
The question is whether data from the whole table or just a single row 
should be submitted back to the server.

I'm not sure how often you would want to submit data from only one row, 
but if you want to do this, you can filter the data on the server side. 
If all field names (including the submit buttons) contains an id which 
identifies the row uniquely, you can process the data from the row in 
which the submit button was pressed, and ignore the rest.

Of course there is the issue of bandwidth. It seems wasteful to post a 
whole table of data when most of it will be ignored. I dont think its a 
big deal though, unless you have really huge tables.


Btw. the other example in section 2.8 could be rewritten somewhat 
simpler, using separate action attributes on the submit buttons:

<form action="test.cgi">
  <input type="text" name="q">
  <input type="submit" name="t" value="Test">
  <input type="submit" action="google.cgi" value="Google">
  <input type="submit" action="yahoo.cgi" value="Yahoo">
</form>


regards
Olav Junker Kjær



More information about the whatwg mailing list