title: Extracting input from all input boxes into a list using flask
body: <p>I am trying to use my flask backend to extract my input. However, in my html file, I use javascript so that I can dynamically arrange any number of input boxes I want.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;script&gt;
  function add_field()
  {
    var total_text=document.getElementsByClassName("input_text");
    total_text=total_text.length+1;
    document.getElementById("field_div").innerHTML=document.getElementById("field_div").innerHTML+
    "&lt;li id='input_text"+total_text+"_wrapper'&gt;&lt;input type='text' class='input_text' id='input_text"+total_text+"' placeholder='Enter Text'&gt;&lt;/li&gt;";
  }
  function remove_field()
  {
    var total_text=document.getElementsByClassName("input_text");
    document.getElementById("input_text"+total_text.length+"_wrapper").remove();
  }
  &lt;/script&gt;
  {% extends "bootstrap/base.html" %}
  {% block content %}
  
  &lt;div class = "container"&gt;
  &lt;h1&gt;Give the words&lt;/h1&gt;
          &lt;form action='/results' method="post"&gt;
              &lt;div id="wrapper"&gt;
                  &lt;input type="button" value="Add TextBox" onclick="add_field();"&gt;&lt;input type="button" value="Remove TextBox" onclick="remove_field();"&gt;
                  &lt;ol id="field_div"&gt;
  
                  &lt;/ol&gt;
              &lt;/div&gt;
              &lt;input type='submit' value='Select'&gt;
          &lt;/form&gt;
  &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>My views.py is as follows:</p>
  
  <pre><code>from flask import render_template, request
  from app import app
  from .translit import *
  
  @app.route('/')
  def search():
      return render_template('index.html')
  
  
  @app.route('/results', methods=['POST'])
  def results():
      words = getwds(request.form['input_text1'])
      return render_template('results.html', words=words)
  </code></pre>
  
  <ul>
  <li>How do I change the code in such a way that all the input boxes are
  extracted from in a list?</li>
  </ul>