We're working with community non-profits who have a Host Home or empty bedrooms initiative to develop a workflow management tool to make the process scalable (across all providers), reduce institutional bias, and effectively capture data.
I added a contact information section to profile.ts to include the required email, phone number, and desired contact method. This included incorporating a linked fields section because the field ids were not accessible within the intakeProfileGroups component.
I also added regex expressions to do a quick validation on email and phone number.
Rationale behind the changes?
The preferred contact method was needed in the contact information component and email and phone number needed to be verified based on format.
What did you learn or can share that is new?(optional)
The regex expression used to validate email and phone does not follow best practices, but can be updated to include a separate validation library if needed.
I tried accessing the field ids using hooks (useState, useRef, useEffect), however it didn't work so the linked fields were a workaround. This can be updated later if we have a fixed field id in that section.
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are appliedVisuals after changes are applied
Closes #683
What changes did you make?
Rationale behind the changes?
The preferred contact method was needed in the contact information component and email and phone number needed to be verified based on format.
What did you learn or can share that is new?(optional)
The regex expression used to validate email and phone does not follow best practices, but can be updated to include a separate validation library if needed. I tried accessing the field ids using hooks (useState, useRef, useEffect), however it didn't work so the linked fields were a workaround. This can be updated later if we have a fixed field id in that section.
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
Visuals after changes are applied