create-portfolio icon indicating copy to clipboard operation
create-portfolio copied to clipboard

Contact form support

Open egoist opened this issue 4 years ago • 3 comments

Add support for Netlify forms / Formik.com / FormSimple.io support

Sample usage:

module.exports = {
  themeConfig: {
    contactForm: {
      type: 'netlify' // or formik / formsimple etc,
      formId: 'xxx'
    }
  }
}

Then it should create a contact page (/contact) that includes the contact form.

egoist avatar Mar 24 '20 09:03 egoist

I've started working on this and just wanted some clarification.

Should the contact page just be a field for Name, Email, and Message, or more customizable from the contact.md?

I'm starting with Nelify Forms and FormSimple for now, as Formik / Formium would require much more setup than just a type and an id. Maybe other services can be for future issues.

samuel-pratt avatar Dec 02 '20 02:12 samuel-pratt

I think only Name, Email, and Message are required, btw forget FormSimple, it's my half-baked project (not working currently)

egoist avatar Dec 02 '20 07:12 egoist

If I leave out FormSimple and just do Netlify Forms for now, is it necessary to have the section in config? Netlify Forms doesn't require a FormId or other setup like that. So I think it would work to just create a contact layout and set it up by adding a contact.md and a section in nav, similar to the setup for the about page.

In the future if there is support for other form services, then a more fleshed out config setup could be added.

samuel-pratt avatar Dec 02 '20 23:12 samuel-pratt