You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The legal address form fields have snake case names that match the names and structure of the API results we get from the profile/legal address endpoint. Our form field names should all be camel case (see: static/js/components/forms/ChangeEmailForm.js) to match our general JS variable naming scheme, and the API results should be mapped appropriately to those fields. We also probably don't need to namespace the field names (e.g.: name="legal_address.first_name" --> name="firstName").
I noticed this when reviewing #161. That PR appends "Error" to the end of form field names to create id values, and there was no graceful way to do that given our dot-and-snake-case form field names
The text was updated successfully, but these errors were encountered:
Reference: https://github.com/mitodl/mitxonline/blob/main/static/js/components/forms/ProfileFormFields.js -
LegalAddressFields
andProfileFields
The legal address form fields have snake case names that match the names and structure of the API results we get from the profile/legal address endpoint. Our form field names should all be camel case (see:
static/js/components/forms/ChangeEmailForm.js
) to match our general JS variable naming scheme, and the API results should be mapped appropriately to those fields. We also probably don't need to namespace the field names (e.g.:name="legal_address.first_name"
-->name="firstName"
).I noticed this when reviewing #161. That PR appends
"Error"
to the end of form field names to create id values, and there was no graceful way to do that given our dot-and-snake-case form field namesThe text was updated successfully, but these errors were encountered: