How to Create a Contact Form Using Formspree | TechBuzz

- Advertisement -

Add a contact form to your site, even if it’s static. Find out how Formspree can help solve your data-collecting requirements.

- Advertisement -

You can use many methods on your website to allow users to securely send emails to you. One example is using the mailto attribute on a contact form. The mailto attribute opens an installed mail application for the user to enter a message.

For a better experience, consider integrating a tool like Formspree. Formspree acts as an intermediary, recording form data and sending it to your specified email address.

What Is Formspree and How Does It Work?

Formspree is an emailing service that you can integrate onto a custom contact form. When you log into Formspree, you can specify your target email address for a form. Formspree handles form submissions on your behalf. It lets you create a free contact form, like Google Forms, but you host the actual form markup on your own site.

Formspree will generate an endpoint, which you will need to add to your custom form. When a user presses the “Submit” button, the form will use the endpoint to call Formspree’s API service. This will generate an email with the contents of the contact form.

Formspree will send this email to the target email you listed in your Formspree account. You will then receive the email in your inbox. Your Formspree account also has a place where you can view your contact form submissions.

To register your email with Formspree, log in and enter the target email address for your form.

  1. Log into Formspree. If you do not have an account, you will need to enter your email address and a password. Register using the email address you want the contact form to send submissions to. You may also need to verify this email address during the signup process.

  2. Once the signup process is complete, the “Forms” page will open. Click on New Form.

  3. Enter any name for your contact form and leave the default project settings. Enter the target email address in the “Send emails to” field. This is where Formspree will send your contact form submissions. Once completed, click on Create Form.

  4. Formspree will provide you with an endpoint, and examples of how to use it. You will need to add this endpoint to your custom contact form on your website (more on this later).

  5. By default, Formspree stores your form under a project called “My First Project”. If you want to change the name of this, go back to the “Forms” page. Click on Settings next to the name of the project.

  6. Here, you can change the name of your project to something else. For example, you can rename it to have the same name as your website. You can also add the URL for your website.


You will need to add the endpoint provided by Formspree into the contact form in your website’s code.

  1. Add the endpoint into the “action” attribute for the form. This will cause a user’s browser to send the form to that URL when they submit it.
    <form action="" method="POST">
    <!-- Your form here -->
    <button type="submit" class="button"> Submit </button>
  2. Add inputs to your form. You can use this example form which uses the Bootstrap CSS framework:
    <form action="" class="extra-padding" method="POST">
    <div class="form-group">
    <label for="replyTo"> Your Email address </label>
    <input type="email" class="form-control" id="replyTo" name="_replyto" ngModel="reply" aria-describedby="emailHelp" placeholder="[email protected]">
    <small id="emailHelp" class="form-text text-muted"> Your email will not be shared with anyone else. </small>
    <div class="form-group">
    <label for="message"> Your message </label>
    <textarea name="message" style="height:200px" class="form-control" id="message" placeholder="Hey there! I'm contacting you because..."> </textarea>
    <button type="submit" class="button"> Submit </button>

To test if Formspree is working, send yourself a message using the contact form, press Submit, and check your email’s inbox.

  1. Run your website and open the page that has the contact form. Enter a message into the contact form and press Submit.

  2. You will receive the contact form message in your inbox.

  3. If you go back to Formspree, click on the Submissions tab. Here you will also be able to see submitted messages from your contact form.

Formspree is one of the many services you can use to integrate a custom contact form onto your site. It allows you to quickly start accepting user feedback without having to worry about the backend details.

If you’re new to creating forms with HTML and JavaScript, you can also learn more about client-side form validation. This helps to ensure that your contact forms can validate all user input.

Paper form lying on table
How to Implement Client-Side Form Validation With JavaScript

Read Next

About The Author

Source link

- Advertisement -
I am admin of blog & I provide tech-related news. As a part of my hobby, I make content related to technology and gadgets reviews too. I love to be a content creator apart from it, I am a full-time employee in an MNC company and manage blogs systematically. You can mail me at [email protected]

More from author

Related posts


Latest posts

Want to buy cheap and reliable software? Genuine Windows 10 Pro from € 5.63! | TechBuzz

There are official licenses for each type of operating system, as well as for various software. You can check the Keysfan product database...

Nothing Phone (1): design, price and release date leaked | TechBuzz

Things are getting serious for the OnePlus co-founder, who wants to lead his own company to success with Nothing. After headphones, the Nothing...

Want to stay up to date with the latest news?

We would love to hear from you! Please fill in your details and we will stay in touch. It's that simple!