class QuickSearchForm(Form): age_group_choices = [("A", gettext("Voksne")), ("C", gettext(u"Børn"))] age_group = RadioField("age_group", choices=age_group_choices, validators=[Required()], default="A") #sex_choices = [("F", gettext("Kvinde")), ("M", gettext("Mand")), ("U", gettext("Unisex"))] sex_choices = [("F", gettext("Kvinde")), ("M", gettext("Mand"))] product_sex = RadioField("product_sex", choices=sex_choices, validators=[Required()], default="F") mm_foot_length = IntegerField('mm_foot_length', validators = [Required(), NumberRange(min=0, message="FOOO")]) mm_forefoot_width = IntegerField('mm_forefoot_width', validators = [Required(), NumberRange(min=0)]) #mm_foot_length = TextField('mm_foot_length', validators = [Required()]) mm_forefoot_height = TextField('mm_forefoot_height', validators = [Optional()]) ---------------------
{{form.hidden_tag()}}

{{ gettext("Indtast mål på din fod") }}

{{form.age_group.label( gettext("Aldersgruppe") ) }}
{{form.product_sex.label( gettext("Køn") ) }} {{form.product_sex(class="radio") }} {% for error in form.errors.product_sex %} [{{error}}] {% endfor %}