title: Yesod forms with page flow
body: <p>Certain forms are too complicated to have them fit on one page. If, for example, a form involves large amounts of structured data, such as picking locations on a map, scheduling events in a calendar widget, or having certain parts of a form change depending on earlier input, it is of value to be able to break up a certain form over multiple pages.</p>
  
  <p>This is easy to do with dynamic web pages and Javascript, as one would simply create a tab widget with different pages, and the actual submitted form would contain the whole tab widget and all of its input fields, yielding a single <code>POST</code> request for the entire operation.</p>
  
  <p>Sometimes, however, it takes a long time to generate certain input fields; they might even be computationally intensive even after the page has been generated, taxing the low-end computer user's browser. Additionally, it becomes difficult or impossible to create forms that adapt themselves based on earlier input.</p>
  
  <p>It therefore becomes necessary to split up a certain form over multiple full page requests.</p>
  
  <p>This can prove to be difficult, especially since the first page of a form will <code>POST</code> to <code>/location/a</code>, which will issue a redirect to <code>/location/b</code> and requested as <code>GET</code> by the client. Passing the stored form data from <code>POST /location/a</code> to <code>GET /location/b</code> is where the difficulty lies.</p>
  
  <p>Erwin Vervaet, the creator of Spring Web Flow (A subproject of the Spring framework, mostly known for its dependency injection capabilities) once wrote <a href="http://ev9d9.blogspot.se/2009/11/page-flow-challenge.html" rel="noreferrer">a blog article</a> demonstrating this functionality in said framework, and also comparing it to the Lift Web Framework which implemented <a href="http://demo.liftweb.net/wiz2" rel="noreferrer">similar functionality</a>. He then presents a challenge to other web frameworks, which is further described in <a href="http://ev9d9.blogspot.se/2009/11/page-flow-challenge-clarification.html" rel="noreferrer">a later article</a>.</p>
  
  <p>How would Yesod face this problem, especially considering its stateless REST-based nature?</p>