Vue Contact Form with only Frontend Code
Start collecting form submissions from your Elementor form with FormAPI in 2 minutes. Create your form in FormAPI and paste your unique URL inside your form. Check out the code examples and detailed tutorial below to get started.
VS Code
<template>
<div>
<button @click="getData">Fetch Data</button>
<p>{{ result }}</p>
</div>
</template>
<script>
export default {
data() {
return {
result: ''
};
},
methods: {
async getData() {
try {
const response = await fetch('https://submit.zunoy.com/sub/[YOUR-FORM-KEY]');
const data = await response.json();
this.result = JSON.stringify(data);
} catch (error) {
console.error(error);
}
}
}
};
</script>How to Integrate Code
What is Vue?
Vue.js is a progressive JavaScript framework for building user interfaces. It is designed to be incrementally adaptable. FormAPI works seamlessly with Vue, and this guide will show you how to integrate it.
FormAPI Setup with Vue using Fetch
Fetch is a native API for making HTTP requests. Below is an example demonstrating how to send form data to FormAPI using Fetch in a Vue application. Ensure that you replace “https://submit.zunoy.com/sub/sub/[YOUR-FORM-KEY]” with your unique mockapi URL.
VS Code
<template>
<div>
<button @click="getData">Fetch Data</button>
<p>{{ result }}</p>
</div>
</template>
<script>
export default {
data() {
return {
result: ''
};
},
methods: {
async getData() {
try {
const response = await fetch('https://submit.zunoy.com/sub/[YOUR-FORM-KEY]');
const data = await response.json();
this.result = JSON.stringify(data);
} catch (error) {
console.error(error);
}
}
}
};
</script>FormAPI Setup with Vue using Axios
Axios is a promise-based HTTP client for JavaScript that makes API requests simpler. Below is an example showing how to send form data to FormAPI using Axios in Vue. Ensure that you replace “https://submit.zunoy.com/sub/[YOUR-FORM-KEY]” with your unique mockapi URL.
VS Code
<template>
<div>
<button @click="getData">Fetch Data (Axios)</button>
<p>{{ result }}</p>
</div>
</template>
<script>
import axios from 'axios';
export default {
data() {
return {
result: ''
};
},
methods: {
async getData() {
try {
const response = await axios.get('https://submit.zunoy.com/sub/[YOUR-FORM-KEY]');
this.result = JSON.stringify(response.data);
} catch (error) {
console.error(error);
}
}
}
};
</script>FormAPI Setup for File Uploads in Vue
To upload files in Vue using FormAPI, you can use FormData along with Axios or Fetch. The example below demonstrates how to handle file uploads in Vue. Ensure that you replace “https://submit.zunoy.com/sub/[YOUR-FORM-KEY]” with your own unique mockapi URL.
VS Code
<template>
<div>
<input type="file" @change="uploadFile" />
<p>{{ message }}</p>
</div>
</template>
<script>
export default {
data() {
return {
message: ''
};
},
methods: {
async uploadFile(event) {
const file = event.target.files[0];
if (!file) return;
const formData = new FormData();
formData.append('file', file);
try {
const response = await fetch('https://submit.zunoy.com/sub/[YOUR-FORM-KEY]', {
method: 'POST',
body: formData
});
this.message = response.ok ? 'File uploaded successfully!' : 'Upload failed.';
} catch (error) {
console.error(error);
}
}
}
};
</script>Set Up FormAPI in 60 Seconds
Create Your Form
Sign up and create a form in FormAPI — no backend code required.
Get Your Endpoint
FormAPI gives you a unique endpoint. Point your form's action attribute (or a fetch/axios call) at it.
Start Receiving Submissions
Submissions land instantly in your dashboard inbox, with spam filtering and alerts built in.
USE CASES
Need templates? Say less.
A collection of example HTML forms with code that you can edit live, then download or copy/paste. A minimal form reset css is included that should work with most sites.
Simple Contact Form
Survey Form
Book a Demo Form
News Letter Form
Registration Form & more...
Ready to Experience Zunoy?
Start your journey with Zunoy's powerful suite of tools, designed for startups, developers, and growing teams alike.
FormAPI
Collect submissions without a backend—add a headless mockapi to any <form>
Operational
Contact Us On
Mail Us
support@zunoy.comCopyright © 2026 - Mentcube Innovations Pvt Ltd.. All Rights Reserved.