Currently a work in progress to add new form fields for businesses based on design. Will update as I finish this up.
[x] Add new form fields to the existing site, apply new logic based on designs and data structure
[x] Solidify the validation
[x] Make sure that we don't submit data associated with optional fields
If user fills out street address, and switches option to "online only" we need to make sure that the street address field does not get submitted with the business submission.
Check this on all conditionally rendered fields as well (donation campaign, i am the owner, etc.)
Related to #306
Pages/Interfaces that will change
/businesses (specifically the register a business modal)
Screenshots / video of changes
Steps to test
Navigate to the /businesses page
Click "Register a business" to see the register form pop up in a modal.
Ensure that form does not submit unless all required fields are filled in
Ensure fields associated with conditional logic are handled properly. For example, we want to make sure that fields associated with "physical address" are not submitted for an "online only" business. This carries over to the donation link, and business owner field options.
Additional notes
The validation logic here is pretty strict, we will likely want to iterate on a couple things here, namely the way that validation messages are shown to the user, and actual form field data validation as well (i.e properly formatted URLs, numbers, addresses etc.)
Describe your PR
Currently a work in progress to add new form fields for businesses based on design. Will update as I finish this up.
Related to #306
Pages/Interfaces that will change
/businesses (specifically the register a business modal)
Screenshots / video of changes
Steps to test
Additional notes
The validation logic here is pretty strict, we will likely want to iterate on a couple things here, namely the way that validation messages are shown to the user, and actual form field data validation as well (i.e properly formatted URLs, numbers, addresses etc.)