Need to send form to email address

Hi,

I’m looking for the best way for a user on my website to send a simple form with their name, number, email address and the option to attach photos.

Can this be done by JS and would I need a back end set up?

Any pointers to learning materials is greatly appreciated, thanks.

Fraser

@bayzoo Yes, you need some kind of backend to process data from the form on the web page. The backend would be something like Python, Node.js, or PHP which would be run on a VPS (virtual private server). Saving that data would mean installing a database such as Postgresql, MongoDB, or Sqlite.

Some places that let you have add a contact form to a static website such as Netlify. Netlify does not require a backend to be set up in order to have a working contact form.

1 Like

It depends on where and how you’d like to send the data. To your email? Save on your server?

There are services like Typeform that include limited free tier plan.

For personal use I’d just spin up Express server with single POST route, use nodemailer package to send the form data to my gmail. Perhaps you could host it with free Heroku.