Beginner4 min readUpdated Mar 27, 2026

How to Add a Contact Form to Vue.js (No Backend Required)

Add a working contact form to any Vue.js app using FormsList.

TL;DR

To add a contact form to Vue.js without a backend, create a component with v-model bindings and submit to a FormsList endpoint using fetch. Point your form to formslist.com/f/YOUR_HASH and FormsList handles submissions, spam filtering, and email notifications automatically.

By Vaibhav Jain·Published March 27, 2026

Prerequisites

  • Vue.js 3 project
  • FormsList account (free)
1

Create a FormsList endpoint

Sign up at formslist.com, create a new form, and copy your endpoint URL.

2

Create the ContactForm component

Create a Vue component with ref() and v-model bindings.

<script setup>
import { ref } from 'vue'
const name = ref('')
const email = ref('')
const message = ref('')
const submitted = ref(false)

async function handleSubmit() {
  const res = await fetch('https://formslist.com/f/YOUR_HASH', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
    body: JSON.stringify({ name: name.value, email: email.value, message: message.value }),
  })
  if (res.ok) submitted.value = true
}
</script>

<template>
  <p v-if="submitted">Thanks! We'll be in touch.</p>
  <form v-else @submit.prevent="handleSubmit">
    <input v-model="name" placeholder="Name" required />
    <input v-model="email" type="email" placeholder="Email" required />
    <textarea v-model="message" placeholder="Message" required />
    <button type="submit">Send</button>
  </form>
</template>
3

Add to your page

Import and use <ContactForm /> in any page.

4

Test

Submit a test message and verify in your FormsList dashboard.

Frequently Asked Questions

Ready to collect form submissions?

Set up your form backend in under a minute. No server required, no complex configuration — just a simple endpoint for your forms.