title: Using Flask and WTForms how can i have a table where some columns are inputs?
body: <p>I'm struggling to see how this is done, and the documentation doesn't seem to help much.</p>
  
  <p>I need to generate a table, the row size will be variable, but not dynamic (i know how much rows i need before generating the page).</p>
  
  <p>For the sake of simplicity lets imagine a page where you grade n exams with an integer.</p>
  
  <p>i tried this:</p>
  
  <p><strong>the form.</strong></p>
  
  <pre><code>class InputInteger(Form):
      grade = IntegerField('Grade')
  </code></pre>
  
  <p><strong>the view</strong></p>
  
  <pre><code>@decorator..
  def grade():
      form = InputInteger()
      names = student_list
  
      return render_template("grade.html", form=form, names=names)
  </code></pre>
  
  <p><strong>the template</strong></p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Grade&lt;/th&gt;
      &lt;/tr&gt;
      {% for name in names %}
      &lt;tr&gt;
          &lt;td&gt;
              {{name}}
          &lt;/td&gt;
          &lt;td&gt;
              {{form.grade}}
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>But how do i read back the inputed values?
  How do i distinguish who's grade that belongs too?</p>
  
  <p>Am fairly confused, i've read about FieldList(FormField(IntegerField)), but isn't that just one field with a list of integers?
  What about the Table Widget, do i need that?</p>
  
  <p>Please help.</p>