title: in node.js express app, req.body does not get <textarea> value?
body: <p>I am working with an express app in node.js. I have the following html form (inputForm.html):</p>
  
  <pre><code>&lt;form action="/" method="post"&gt;
  Name: &lt;br&gt;
      &lt;input type="text" name="name" size="45"&gt;
      &lt;br&gt;
      Document: &lt;br&gt;
      &lt;textarea&gt; &lt;input type="text" name="document" size="45"&gt; &lt;/textarea&gt;
      &lt;br&gt;
      &lt;br&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and the following javascript file:</p>
  
  <pre><code>app.use(bodyParser.urlencoded({extended: false}));
  
  app.use(bodyParser.json());
  
  app.use(bodyParser.json({type: 'application/vnd.api+json' }));
  
  app.get('/', function (req, res) {
  
    res.sendFile(__dirname + "/" + "inputForm.html");
  
  });
  
  app.post('/', function (req, res) {
  
      var name = req.body.name;
      var document = req.query.document;
  
      console.log(req.body);
  
  });
  </code></pre>
  
  <p>However, only the first value (name) shows up when I print req.body to the console. If I remove the textarea tag, the document also shows up. However, I want to leave it because I want to preserve natural line breaks in the document input. Anyone know what I need to do to fix this?</p>
  
  <p>Thanks so much!</p>