Vue multi-step form

Build a multi-step form in Vue with no backend. Collect fields across steps in a reactive object, then post once to Formpaste at the end. Copy the wizard component and add your access key.

Step 1 of 3

How to build it

  1. Create a form in your Formpaste dashboard and copy its access key.
  2. Copy the multi-step component below into your app.
  3. Replace YOUR_ACCESS_KEY_HERE with your access key, then deploy.

Prompt for your AI coding agent

Add a Formpaste multi-step form to my Vue 3 app. Use a single-file component with <script setup> that collects name, email and message across several steps in a reactive object with Next and Back buttons, then POSTs once at the end as application/x-www-form-urlencoded (URLSearchParams) to https://api.formpaste.com/submit with a hidden access_key. Do not post on every step and do not add a backend.

Or connect the Formpaste MCP server to Claude Code, Codex, Cursor, Claude Desktop, VS Code, or any mcp-remote client. See the setup guide.

Vue gotchas

A Vue contact form is a single-file component with v-model bindings and an @submit.prevent handler that POSTs to Formpaste. There is no backend and no API of your own. Put the fetch in the component and you are done.

It is a normal component

The form lives in a .vue single-file component with a <script setup> block. Bind the fields with v-model or read a FormData off the form element on submit, then post to the Formpaste endpoint. No store or plugin is required for a simple form.

No API of your own

You do not proxy through your own server. The component posts straight to the Formpaste endpoint, which removes a mailer and a submissions store you would otherwise build.

Handle the response in a ref

The endpoint returns JSON (success, message, id). Await the fetch and set a status ref to show your own success or error state, or set a redirect URL in the dashboard and skip the client handling.

Composition or Options API, both work

The examples use <script setup> and the Composition API, but the same fetch works in an Options API component. Formpaste only cares about the POST, not how you structure the component.

What to get right

One form, several screens

A multi-step form is a single submission split across steps in the UI. Collect all the fields in client state, then post once at the end.

Route per step is optional

You can give each step its own URL for back-button support, or keep it all on one page with local state. Both post the same final payload.

Post the whole payload once

Do not post on every step. Gather the fields as the user advances and send one request when they finish.

How it works

Three simple steps for form submissions to land in your email inbox.
Create your form, set your form's action URL to Formpaste's endpoint, and add your access key.

1

Create your form

Sign up, verify your email, and create an access key in your dashboard.

2

Copy the code

Paste the snippet above into your project. Pick CSS or Tailwind to match your site.

<script setup lang="ts">
import { ref, reactive } from "vue";

const ENDPOINT = "https://api.formpaste.com/submit";
const step = ref(0);
const data = reactive({ name: "", email: "", message: "" });

async function submit() {
  const body = new URLSearchParams({ access_key: "YOUR_ACCESS_KEY_HERE", ...data });
  await fetch(ENDPOINT, { method: "POST", body });
}
</script>

<template>
  <form @submit.prevent="submit">
    <input v-if="step === 0" v-model="data.name" placeholder="Name" required />
    <input v-else-if="step === 1" type="email" v-model="data.email" placeholder="Email" required />
    <textarea v-else v-model="data.message" placeholder="Message" />
    <button v-if="step > 0" type="button" @click="step--">Back</button>
    <button v-if="step < 2" type="button" @click="step++">Next</button>
    <button v-else type="submit">Submit</button>
  </form>
</template>
3

Add your access key

Replace the placeholder with your access key to start receiving submissions.

<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY_HERE">

Vue multi-step form FAQ

Paste a form. Get submissions.

Instantly without setting up any backend, servers or databases. 250 submissions/mo free - no credit card.

Other Vue forms