title: Multi-step form issues in Node Js and Express
body: <p>What is the best practice for creating multistep forms in Node.js and Express currently i am using the following approach:</p>
  
  <pre><code>app.post('/new/beer', function(req, res) {
    // Step one
    if (req.session.currentAction.step == 1) {
       req.session.currentAction.step = 2;
       res.render('beer-step-1');
    }
    // Step two
    if (req.session.currentAction.step == 2) {
       req.session.currentAction.step = 3;
       res.render('beer-step-2');
    }
    // Step three
    if (req.session.currentAction.step == 3) {
       req.session.currentAction.step = 4;
       res.render('beer-step-3');
    }
  });
  </code></pre>
  
  <p>I think my problem is obvious from the code above. No matter what the original step value is the post request is always reaching and rendering the beer-step-3 template. </p>
  
  <p>Am I approaching the multi-step form in the wrong way? Or is there a way to end the request at a certain point?</p>