title: Submit multiple input fields which have the same 'name' attribute
body: <p>I'm having trouble getting a form to work, where-by there are multiple input fields (text) that have the same name attribute.</p>
  
  <p>On the backend, I'm using node.js and Mongoose, using a POST method. Here is a sample of the code:</p>
  
  <pre><code>if(existingFruit) {
          Fruit.findOneAndUpdate({fruit: req.body.fruit}, {
              $push: { price: req.body.price }},
  </code></pre>
  
  <p>Here is the input field in question:</p>
  
  <pre><code>&lt;label for="price"&gt;Price&lt;/label&gt;
  &lt;input type="text" name="price" id="price"/&gt;
  </code></pre>
  
  <p>Basically, somewhere else on the form a user will enter the name of a fruit. Then on the backend, the code looks through the database to see if that fruit is in the DB. If it is (existingFruit), a function is performed. This function will take the <strong>price</strong> a user entered, and add it to the DB as an array. </p>
  
  <p>This form works fine. The price will be entered into the DB in an array (which is set up in my schema, not shown here for simplicity).</p>
  
  <p>Now, notice the 'name' attribute, which is equal to <em>price</em>. Suppose I do this to my form:</p>
  
  <pre><code>&lt;label for="price1"&gt;Price&lt;/label&gt;
  &lt;input type="text" name="price" id="price1"/&gt;
  
  &lt;label for="price2"&gt;Price&lt;/label&gt;
  &lt;input type="text" name="price" id="price2"/&gt;
  </code></pre>
  
  <p>Now my form lets users enter 2 prices for the fruit. Both have the same <strong>name</strong> attributes of <strong>price</strong>. This form won't submit; it will always give me an error.</p>
  
  <p>I don't know how/where to fix this problem.</p>