Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion box #324

Merged
merged 7 commits into from
Aug 27, 2020
Merged

Conversation

SeHarlan
Copy link
Contributor

Describe your PR

Created a suggestion box/form that integrates with Netlify.
!! I've gotten a success message from Netlify, but as I don't have access to the dashboard I cannot fully confirm this !!

A user can access this form by clicking on the contact card I added on the about us page, it then pops open a modal with the form. Talking with Neil, we thought it might be best to remove the business registration contact card as there is essentially already a whole page dedicated to it. I've left the code for it commented out in case we want to bring it back though.

The original issue also mention sending an email to some rbb email account, I have not done that part but can tackle it if we want to add that as well. It would just mean creating a service function and calling it in the handleSubmit func in SuggestionBox.js

I've also added titles to the other forms for consistency

Related to #283
Fixes #283

Pages/Interfaces that will change

added SuggestionBox.js in Forms folder
about.js
ContactCard.js
BusinessSignUpForm.js
AllySignUpForm.js

Screenshots / video of changes

Before:
Screen Shot 2020-08-19 at 4 06 29 PM

After:
Screen Shot 2020-08-19 at 4 06 41 PM

Screen Shot 2020-08-19 at 4 05 28 PM

Drop some screenshots of the before and after of your work here. Better yet, take a screen recording using a tool like Loom

Steps to test

Additional notes

@netlify
Copy link

netlify bot commented Aug 19, 2020

Deploy request for rebuild-black-business accepted.

Accepted with commit 591f2bf

https://app.netlify.com/sites/rebuild-black-business/deploys/5f4436f548609a000a88e181

Copy link
Member

@magnificode magnificode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SeHarlan thank you so much for the work here! Left a few comments.

src/components/Forms/SuggestionBox.js Outdated Show resolved Hide resolved
src/components/Forms/SuggestionBox.js Outdated Show resolved Hide resolved
src/pages/about.js Outdated Show resolved Hide resolved
.env.EXAMPLE Show resolved Hide resolved
.env.development.EXAMPLE Show resolved Hide resolved
}

return (
<FormControl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that this FormControl element is outputting a div instead of a <form> element. It appears that we may just need to manually wrap the form elements with <form netilfy> to get those form submissions working properly!

Screen Shot 2020-08-20 at 11 54 11 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @SeHarlan - I'm not sure if this is just a challenge of testing the form on the deployment preview, but the form still doesn't get dropped into Netlify.

Do you mind trying one more thing for me? After looking at the documentation https://docs.netlify.com/forms/setup/#html-forms it appears that we may need a couple of additional attributes on the form. Primarily name and method.

Could you try adding the following:

name="suggestion-box"

and

method="POST"

Let's give this a shot, and if we still aren't getting form submissions through the deploy preview, we'll merge and see what we get :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Netlify is properly recognizing the form, the honeypot and some Netlify specific elements seem to be populating. I'm going to merge this and test the submissions on production!

@magnificode
Copy link
Member

@SeHarlan this looks great, thank you so much for the work!

@magnificode magnificode merged commit 022aaea into Rebuild-Black-Business:main Aug 27, 2020
@racedale
Copy link
Member

@all-contributors please add SeHarlan for code

@allcontributors
Copy link
Contributor

@racedale

This project's configuration file has malformed JSON: .all-contributorsrc. Error:: Unexpected token { in JSON at position 8547

@racedale
Copy link
Member

@all-contributors please add SeHarlan for code

@allcontributors
Copy link
Contributor

@racedale

I've put up a pull request to add @SeHarlan! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add a Suggestions Box
3 participants