Skip to main content

Best way to build a Contact Us page

Rails • Asked by Simon P
De56cc76c83ebb1ee4790e78f3fcd39b

Hi

First post so Hello World! Really enjoying this site.

I was just wondering what people consider to be the best way to build a Contact Us page.

I don't need to store the entered data, just email it to a couple of people.

I would want validation on the input.

I found this tutorial - is this broadly the correct approach?

https://www.murdo.ch/blog/build-a-contact-form-with-ruby-on-rails-part-1

Thanks

Simon


80da16d1d147c38831b8282061ed85c8

Table-less seems like the way to go for contact forms.

The only part missing from a quick look is the set up of an Email service. I can recommend , really easy to integrate in your Rails app: https://www.mailgun.com


De56cc76c83ebb1ee4790e78f3fcd39b

Thanks, will give it a try.


C544f3ac6ebba0803aa632bff8804a8f

As a bonus, I highly suggest you implement a captcha. There is a gem for googles recaptcha which is easy to install. Spammers will send you junk. They still get through recaptcha but less often.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 18,000+ developers who get early access to new screencasts, articles, guides, updates, and more.

By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

More of a social being? We're also on Twitter and YouTube.