'Add a gender field to a form description.
Arguments:
form_desc: A form description
Keyword Arguments:
required (bool): Whether this field is required; defaults to True'

def _add_gender_field(self, form_desc, required=True):

    gender_label = _(u'Gender')
    options = [(name, _(label)) for (name, label) in UserProfile.GENDER_CHOICES]
    form_desc.add_field('gender', label=gender_label, field_type='select', options=options, include_default_option=True, required=required)
