title: How to override parent form mapping in a child form?
body: <p>Sorry for the title, not sure how to word it. I have a form which displays some data in a table. </p>
  
  <pre><code>&lt;form action="#" th:action="@{/do/stuff}" th:object="${foo}" method="post"&gt;
      &lt;table&gt;
          ....
          &lt;tr th:each="currentFoo : *{fooList}"&gt;
  
          &lt;td&gt;...&lt;td&gt;
          &lt;td&gt;
              &lt;a th:href="'/anotherPage/' + ${currentFoo.getId()}"&gt;
                 &lt;button&gt;Go to Different page&lt;/button&gt;
              &lt;/a&gt; 
          &lt;/td&gt;
       ...
      &lt;/table&gt;
      &lt;button type="submit" value="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And then controller: </p>
  
  <pre><code>@RequestMapping(value="/do/stuff", method = RequestMethod.POST)
  public String processQuery(@ModelAttribute FooWrapper wrapper, Model model){....}
  
  @RequestMapping(value="anotherPage/{fooID}", method=RequestMethod.GET)
  public String getClient(@PathVariable int id, Model model){...}
  </code></pre>
  
  <p>The problem is that when I click on the button "Go to Different Page", the form is posted and picked up by the mapping <code>/do/stuff</code>. </p>
  
  <p>How can I have a button which simply takes me to a completely different page, passing an ID via <code>get</code> (think of it as having an option to edit an entry along with the standard option to post all the entries)? I just need to reach the page <code>anotherPage/{fooID}</code></p>
  
  <p>I have tried adding a button-form, in the hopes that it would override the parent form and do a <code>get</code> request to the mapping that I wanted, but it didn't work, it all gets picked up by outer form. </p>
  
  <pre><code>&lt;form th:action="'/anotherPage/' + ${currentFoo.getID()}" style="display: inline" th:method="get"&gt;
      &lt;input type="submit" th:value="Go to Page" role="button" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Is this even possible? I could even change the child method to <code>post</code> if I had to, but the parent form cannot change. 
  Any suggestions? </p>
  
  <p><strong>Update</strong> - I have found and posted a solution but I am unable to accept until tomorrow! </p>