title: validate_on_submit always returns false using Flask WTForms
body: <p>I have a simple radio field, and it always causes validate_on_submit to return false.  When I print form.errors, it looks like "not a valid choice" is being passed as the value from the radio field, despite coerce=int.</p>
  
  <p>I don't think I'm clobbering anything returned in the forms, and I'm hopefully creating dynamic choices the right way.  I don't understand why this fails.</p>
  
  <p>Here are the relevant parts of my project - any suggestions appreciated.</p>
  
  <p>forms.py:</p>
  
  <pre><code>class SelectRecord(Form):
      rid = RadioField("Record Select", choices=[], coerce=int,validators=[InputRequired()])
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>@mod.route('/select/', methods=('GET', 'POST'))
  @login_required
  def select_view():
      form = SelectRecord(request.form)
      if form.validate_on_submit():
          rid = form.data.rid
          if form['btn'] == "checkout":
              # check out the requested record
              Records.checkoutRecord(rid)
              return render_template('/records/edit.html',rid=rid)
          elif form['btn'] == "checkin":
              Records.checkinRecord(rid)
              flash("Record checked in.")
      else:
          mychoices = []
          recs_co = session.query(Records.id).filter(Records.editing_uid == current_user.id).  \
              filter(Records.locked == True)
          for x in recs_co:
              mychoices.append((x.rid,"%s: %s (%s)" % (x.a, x.b, x.c, x.d)))
          x = getNextRecord()
          mychoices.append((x.id,"%s: %s (%s %s)" % (x.a, x.b, x.c, x.d)))
          form.rid.choices = mychoices
      print form.errors
      return render_template('records/select.html', form=form)
  </code></pre>
  
  <p>And my template (select.html):</p>
  
  <pre><code>&lt;form method="POST" action="/select/" class="form form-horizontal" name="select_view"&gt;
          &lt;h1&gt;Select a record to edit:&lt;/h1&gt;
          {{ render_field(form.rid, class="form-control") }}
          {{ form.hidden_tag() }}
          &lt;button type="submit" name="btn" class="btn" value="Check Out"&gt;Check Out&lt;/button&gt;
          &lt;button type="submit" name="btn" class="btn" value="Check In"&gt;Check In&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>