Zunoy header logo
Shopify Integration

Shopify Contact Form Integration

Collect form submissions from your Shopify store using FormAPI. You can add custom HTML/JS forms in your Shopify theme or pages to send data directly to FormAPI.

VS Code
<form id="formapi-shopify" onsubmit="handleSubmit(event)">
  <label>Email:</label>
  <input type="email" name="email" required />

  <label>Message:</label>
  <textarea name="message" required></textarea>

  <button type="submit">Send</button>
</form>
<p id="success-message" style="color:green; display:none">Form submitted successfully!</p>
<p id="error-message" style="color:red; display:none"></p>

<script>
  async function handleSubmit(event) {
    event.preventDefault();
    const form = event.target;
    const email = form.email.value;
    const message = form.message.value;

    const successEl = document.getElementById('success-message');
    const errorEl = document.getElementById('error-message');
    successEl.style.display = 'none';
    errorEl.style.display = 'none';

    try {
      const res = await fetch('https://submit.zunoy.com/sub/[YOUR-FORM-KEY]', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
        body: JSON.stringify({ email, message })
      });
      const data = await res.json();
      if (data.code === 200) successEl.style.display = 'block';
      else {
        errorEl.textContent = data.message || 'Something went wrong';
        errorEl.style.display = 'block';
      }
    } catch (err) {
      errorEl.textContent = err.message;
      errorEl.style.display = 'block';
    }
  }
</script>

How to Integrate Code

What is Shopify?

Shopify is a hosted e-commerce platform that allows you to create online stores using themes and templates. Custom forms can be added using Liquid and JavaScript to integrate with external services like FormAPI.

FormAPI Setup in Shopify with Fetch

Use the Fetch API inside a <script> tag in Shopify theme files or page sections. Replace “https://submit.zunoy.com/sub/[YOUR-FORM-KEY]” with your unique FormAPI URL.

Vs Code
<script>
  async function handleSubmit(event) {
    event.preventDefault();
    const form = event.target;
    const email = form.email.value;
    const message = form.message.value;

    try {
      const res = await fetch('https://submit.zunoy.com/sub/[YOUR-FORM-KEY]', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
        body: JSON.stringify({ email, message })
      });
      const data = await res.json();
      if (data.code === 200) alert('Form submitted successfully!');
      else alert(data.message || 'Something went wrong');
    } catch (err) {
      alert(err.message);
    }
  }
</script>

FormAPI Setup for File Uploads in Shopify

Use native file input with FormData in Shopify for file uploads. Replace the endpoint with your FormAPI URL.

Vs Code
<script>
  async function handleSubmit(event) {
    event.preventDefault();
    const form = event.target;
    const email = form.email.value;
    const file = form.file.files[0];
    if (!file) return alert('Please select a file');

    const formData = new FormData();
    formData.append('email', email);
    formData.append('file', file);

    try {
      const res = await fetch('https://submit.zunoy.com/sub/[YOUR-FORM-KEY]', {
        method: 'POST',
        body: formData
      });
      const data = await res.json();
      if (data.code === 200) alert('Form submitted successfully!');
      else alert(data.message || 'Something went wrong');
    } catch (err) {
      alert(err.message);
    }
  }
</script>

Set Up Forms Checks in 60 Seconds

1

Choose HTTPS Monitor

Select HTTPS monitoring to track website uptime, SSL expiry, redirects, and response codes from global locations.

2

Enter Site URL & Options

Type your website URL, add optional headers or auth tokens, then pick the check interval you prefer.

3

Activate & Get Instant Status

We run the first check instantly and alert on downtime, SSL errors, or failed HTTPS responses.

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. A minimal form reset css is included that should work with most sites. A minimal form reset css is included that should work with most sites.

  • Simple Contact Form
  • Survery Form
  • Book a Demo Form
  • News Letter Form
  • Registration Form & more...
Learn More
alt Image

Ready to Experience Zunoy?

Start your journey with Zunoy’s powerful suite of tools, designed for startups, developers, and growing teams alike.

All our products come with a lifetime free tier.

Copyright © 2025 - Mentcube Innovations Pvt Ltd. All Rights Reserved.

FormAPI