title: How is it possible to get data from one form that has multiple textareas in Django
body: <p>I'd like to get data from one form that has multiple textareas inside , In my views: 'compare_ingredients' I've tried requesting data from my form id 'compareform' also the textarea id 'ingredients', but when I enter something into one texture and click on submit it comes back as 'None' when I print. Here is my html and views:</p>
  <p>html :</p>
  <pre><code>&lt;div class=&quot;container-fluid&quot;&gt;
  
  
  
          &lt;h4&gt;Please enter in your ingredients:&lt;/h4&gt;
  
          &lt;h6&gt;(Seperate each item by comma)&lt;/h6&gt;
  
          &lt;br&gt;
  
          &lt;button class=&quot;add_item&quot;&gt;Add Item&lt;/button&gt;
          &lt;br&gt;
  
              
  
              &lt;div class=&quot;row row-cols-1 row-cols-md-2 mx-auto&quot;&gt;
                              
                              
                      &lt;form action=&quot;{% url 'compare_ingredients' %}&quot; method=&quot;POST&quot; name=&quot;compareform&quot; id=&quot;compare&quot;&gt;
                              {% csrf_token %}
  
                              &lt;br&gt;
                              &lt;button type=&quot;submit&quot; class=&quot;btn btn-info sub_btn&quot;&gt;Submit&lt;/button&gt;
                              
  
                              
                              &lt;button type=&quot;submit&quot; class=&quot;btn btn-secondary back_button&quot;&gt;
                              &lt;a href=&quot;{% url 'home' %}&quot; class=&quot;back_button_text&quot;&gt;Back&lt;/a&gt;
                              &lt;/button&gt;
                              &lt;br&gt;
  
  
                              &lt;br&gt;
                              &lt;div class=&quot;row form_row&quot;&gt;
                                      &lt;div class=&quot;col mb-4&quot;&gt;
                                          &lt;h5&gt;Item 1&lt;/h5&gt;
                                          &lt;div class=&quot;card form_card&quot;&gt;
                                              &lt;div class=&quot;card-body compare_cardbody&quot;&gt;
                                                  &lt;textarea name=&quot;ingredients1&quot; id=&quot;ingredients&quot; cols=&quot;30&quot; rows=&quot;10&quot; form=&quot;compareform&quot;&gt;&lt;/textarea&gt;
                                                  
                                              &lt;/div&gt;
                                          &lt;/div&gt;    
                                      &lt;/div&gt;
                                  
                                      
                                
                                      &lt;div class=&quot;col mb-4&quot;&gt;
                                          &lt;h5&gt;Item 2&lt;/h5&gt;
                                          &lt;div class=&quot;card form_card&quot;&gt;
                                              &lt;div class=&quot;card-body compare_cardbody&quot;&gt;
                                                  &lt;textarea name=&quot;ingredients2&quot; id=&quot;ingredients&quot; cols=&quot;30&quot; rows=&quot;10&quot; form=&quot;compareform&quot;&gt;&lt;/textarea&gt;
                                                  
                                              &lt;/div&gt;
                                          &lt;/div&gt;    
                                      &lt;/div&gt;
                              &lt;/div&gt;    
                                  
                                                         
                      &lt;/form&gt;
       
                  
              &lt;/div&gt;
   
                              
        
          
          
      &lt;/div&gt; 
  </code></pre>
  <p>views.py:</p>
  <pre><code>def compare_ingredients(request):
      if request.method == &quot;POST&quot;:
  
          ingredients = request.POST.get('compareform')
  
          print(ingredients)
          
      
      return render(request, 'result/compare.html')
  </code></pre>