title: How do you overcome the HTML form nesting limitation?
body: <p>I know that XHTML doesn't support nested form tags and I have already read other answers here on Stack Overflow regarding this subject, but I still haven't figured out an elegant solution to the problem.</p>
  
  <p>Some say you don't need it and that they can't think of a scenario were this would be needed. Well, personally I can't think of a scenario that I <em>haven't</em> needed it.</p>
  
  <p>Let's see a very simple example:</p>
  
  <p>You are making a blog app and you have a form with some fields for creating a new post and a toolbar with "actions" like "Save", "Delete", "Cancel".</p>
  
  <pre><code>&lt;form
   action="/post/dispatch/too_bad_the_action_url_is_in_the_form_tag_even_though_conceptually_every_submit_button_inside_it_may_need_to_post_to_a_diffent_distinct_url"
  method="post"&gt;
  
      &lt;input type="text" name="foo" /&gt; &lt;!-- several of those here --&gt;
      &lt;div id="toolbar"&gt;
          &lt;input type="submit" name="save" value="Save" /&gt;
          &lt;input type="submit" name="delete" value="Delete" /&gt;
          &lt;a href="/home/index"&gt;Cancel&lt;/a&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Our objective is to write the form in a way that <em>doesn't require JavaScript</em>, just plain old HTML form and submit buttons.</p>
  
  <p>Since the action URL is defined in the Form tag and not in each individual submit button, our only option is to post to a generic URL and then start "if...then...else" to determine the name of the button that was submitted. Not very elegant, but our only choice, since we don't want to rely on JavaScript.</p>
  
  <p>The only problem is that pressing "Delete", will submit ALL the form fields on the server even though the only thing needed for this action is a Hidden input with the post-id. Not very big deal in this small example, but I have forms with hundreds (so to speak) of fields and tabs in my <a href="http://en.wikipedia.org/wiki/Line_of_business" rel="noreferrer">LOB</a> applications that (because of requirements) have to submit everything in one-go and in any case this seems very inefficient and a waste. If form nesting was supported, I would at least be able to wrap the "Delete" submit button inside it's own form with only the post-id field.</p>
  
  <p>You may say "Just implement the "Delete" as a link instead of submit". This would be wrong in so many levels, but most importantly because Side-effect actions like "Delete" here, should never be a GET request.</p>
  
  <p>So my question (particularly to those that say they haven't needed form nesting) is What do YOU do? Is there any elegant solution that I'm missing or the bottom line is really "Either require JavaScript or submit everything"?</p>