title: How to get a list of values with WTForms in Flask?
body: <p>In the website I'm building with <a href="http://flask.pocoo.org/" rel="nofollow">Flask</a> I'm using <a href="http://wtforms.readthedocs.org/en/latest/" rel="nofollow">WTForms</a> to validate submitted forms. In one form, I'm submitting a list of values with a form like this (the hidden fields are generated client side using js):</p>
  
  <pre><code>&lt;form action="" method="post" id="prop-form"&gt;
      &lt;input type="hidden" name="ids[]" value="54511ea9c1a36b4e910ce52a"&gt;
      &lt;input type="hidden" name="ids[]" value="54511ea9c1a36b4e910ce52d"&gt;
      &lt;input id="title" name="title" size="30" type="text" value=""&gt;
      &lt;input type="submit" value="Save this form"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>On the Flask side, I can easily get the contents of <code>ids[]</code> using he following code:</p>
  
  <pre><code>print request.form
  print request.form.getlist('ids[]')
  </code></pre>
  
  <p>prints out:</p>
  
  <pre><code>ImmutableMultiDict([('ids[]', u'54511ea9c1a36b4e910ce52a'), ('ids[]', u'54511ea9c1a36b4e910ce52d'), ('title', u'Blablabla')])
  [u'54511ea9c1a36b4e910ce52a', u'54511ea9c1a36b4e910ce52d']
  </code></pre>
  
  <p>But when I create a <code>SelectMultipleField</code> in my wtform as follows:</p>
  
  <pre><code>ids = SelectMultipleField('ids[]')
  </code></pre>
  
  <p>and then try to get those values, I get an empty list:</p>
  
  <pre><code>print form.ids.data  # prints out []
  </code></pre>
  
  <p>Any idea how I could mimic the behaviour of <code>request.form.getlist('ids[]')</code> using WTForms? All tips are welcome!</p>