title: How to make a RadioField in Flask?
body: <p>I have a form with a TextField, FileField, and I want to add a RadioField.</p>
  
  <p>I'd like to have a radio field with two options, where the user can only select one. I'm following the example of the two previous forms that work. </p>
  
  <p>My forms.py looks like this</p>
  
  <pre><code>    from flask import Flask, request
      from werkzeug import secure_filename
      from flask.ext.wtf import Form, TextField, BooleanField, FileField, file_required,         RadioField
      from flask.ext.wtf import Required
      class ImageForm(Form):
          name = TextField('name', validators = [Required()])
          fileName = FileField('fileName', validators=[file_required()])
          certification = RadioField('certification', choices = ['option1', 'option2'])
  </code></pre>
  
  <p>In my views.py file I have</p>
  
  <pre><code>form = myForm()
  if form.validate_on_submit():
      name = form.name.data
      fileName = secure_filename(form.fileName.file.filename)
      certification = form.certification.data
  </code></pre>
  
  <p>In my .html file I have </p>
  
  <pre><code>     {% block content %}
       &lt;h1&gt;Simple Form&lt;/h1&gt;
       &lt;form action="" method="post" name="simple" enctype="multipart/form-data"&gt;
           {{form.hidden_tag()}}
           &lt;p&gt;
               Name:
               {{form.name(size=80)}}
           &lt;/p&gt;
           &lt;p&gt;
               Upload a file
               {{form.fileName()}}
           &lt;/p&gt;
           &lt;p&gt;
               Certification:
               {{form.certification()}}
           &lt;/p&gt;
           &lt;p&gt;&lt;input type="submit" value="Submit"&gt;&lt;/p&gt;
       &lt;/form&gt;
       {% endblock %}
  </code></pre>
  
  <p>I can't seem to find examples online of someone using a radio button form. I found a description of RadioField here <a href="http://wtforms.simplecodes.com/docs/0.6/fields.html" rel="noreferrer">http://wtforms.simplecodes.com/docs/0.6/fields.html</a></p>
  
  <p>When I try to visit the my form page I get the DEBUG error "<strong>ValueError: too many values to unpack</strong>"</p>