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

Builds contact form that submits to Sanity #63

Merged
merged 10 commits into from
Jan 19, 2022
Merged

Builds contact form that submits to Sanity #63

merged 10 commits into from
Jan 19, 2022

Conversation

harumhelmy
Copy link
Contributor

@harumhelmy harumhelmy commented Jan 11, 2022

Fixes #46! I hard-coded this contact form in the SectionForm.js component and modified the schema for the Sanity page type to be able to add SectionForm as a component. We could technically make it dynamic but it woulda been a bigger pain in the ass and don't think it's within the project scope.

Screen Shot 2022-01-11 at 16 47 31

To test and be able to see the form show up as above:

  • Run npm install
  • Run Sanity, go to whatever About page you have in your local db.
  • Under that About page sections, click Add item!
  • Title it "Contact Us", add "contact-form" as the Form ID (important!!!), put "Submit" as the button label
  • Go to the about page and voila! Submit you a form!
  • If you have Netlify CLI installed and run netlify dev instead of npm run dev you'll be able to see your submission in Sanity under Contact form submission data type

For the production site after this is merged, I plan on doing the above on behalf of the Recoding CMS users, just to reduce human error. Does this make sense?

@netlify
Copy link

netlify bot commented Jan 11, 2022

✔️ Deploy Preview for recoding-tech-v2 ready!

🔨 Explore the source changes: 6d5a5df

🔍 Inspect the deploy log: https://app.netlify.com/sites/recoding-tech-v2/deploys/61e87846ac961d000799a683

😎 Browse the preview: https://deploy-preview-63--recoding-tech-v2.netlify.app

@harumhelmy harumhelmy requested review from jheretic and rudietuesdays and removed request for jheretic January 11, 2022 21:50
@harumhelmy harumhelmy marked this pull request as ready for review January 11, 2022 21:52
Copy link
Contributor

@rudietuesdays rudietuesdays left a comment

Choose a reason for hiding this comment

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

This is looking great! I see some small style changes and some extraneous fields in the schema. Would you like to pair to go over them? It might be easier than trying to go line by line!

@harumhelmy harumhelmy merged commit ed43828 into master Jan 19, 2022
@harumhelmy harumhelmy deleted the contact-form branch January 19, 2022 20:51
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.

Build contact form
2 participants