gender step uses blank default, lcase values

This commit is contained in:
Ben Wheeler 2019-09-20 18:22:15 -04:00
parent 8f84051a86
commit d905f624ca

View file

@ -67,7 +67,7 @@ class GenderStep extends React.Component {
handleValidSubmit (formData, formikBag) { handleValidSubmit (formData, formikBag) {
formikBag.setSubmitting(false); formikBag.setSubmitting(false);
if (!formData.gender || formData.gender === 'null') { if (!formData.gender || formData.gender === 'null') {
formData.gender = 'Prefer not to say'; formData.gender = ''; // default to blank
} }
delete formData.custom; delete formData.custom;
this.props.onNextStep(formData); this.props.onNextStep(formData);
@ -102,20 +102,20 @@ class GenderStep extends React.Component {
id="GenderRadioOptionFemale" id="GenderRadioOptionFemale"
label={this.props.intl.formatMessage({id: 'general.female'})} label={this.props.intl.formatMessage({id: 'general.female'})}
selectedValue={values.gender} selectedValue={values.gender}
value="Female" value="female"
onSetFieldValue={setFieldValue} onSetFieldValue={setFieldValue}
/> />
<GenderOption <GenderOption
id="GenderRadioOptionMale" id="GenderRadioOptionMale"
label={this.props.intl.formatMessage({id: 'general.male'})} label={this.props.intl.formatMessage({id: 'general.male'})}
selectedValue={values.gender} selectedValue={values.gender}
value="Male" value="male"
onSetFieldValue={setFieldValue} onSetFieldValue={setFieldValue}
/> />
<GenderOption <GenderOption
label={this.props.intl.formatMessage({id: 'general.nonBinary'})} label={this.props.intl.formatMessage({id: 'general.nonBinary'})}
selectedValue={values.gender} selectedValue={values.gender}
value="Non-binary" value="non-binary"
onSetFieldValue={setFieldValue} onSetFieldValue={setFieldValue}
/> />
<div <div