GitHub Pages Integration Guide
Complete guide to integrate MyFormConnect with GitHub Pages
Host a static site on GitHub Pages for free and collect form submissions through MyFormConnect. GitHub Pages serves static files — HTML, CSS, and JavaScript — so you cannot run server-side code. MyFormConnect acts as the form backend, storing submissions and sending notifications.
Prerequisites
- A MyFormConnect account — sign up here
- A form created in MyFormConnect with the form UUID copied
- A GitHub account — sign up at github.com
- Git installed on your computer, or use GitHub's web editor
Integration Methods
Single HTML Page
The simplest approach: one self-contained HTML file with embedded CSS and JavaScript. Suitable for personal portfolios, landing pages, or any project that needs a contact form. Works with both user sites and project sites.
Create the HTML file
contact.html (or add the form to your index.html). The example below is a complete, standalone contact page — HTML, CSS, and the form all in one file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us</title>
<style>
* { box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 560px;
margin: 48px auto;
padding: 0 24px;
color: #1f2937;
}
h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 24px; }
label {
display: block;
font-size: 0.875rem;
font-weight: 600;
margin: 16px 0 4px;
}
input, textarea {
width: 100%;
padding: 10px 12px;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 1rem;
font-family: inherit;
}
input:focus, textarea:focus {
outline: 2px solid #2563eb;
outline-offset: 1px;
border-color: transparent;
}
textarea { resize: vertical; min-height: 100px; }
button {
margin-top: 20px;
padding: 10px 28px;
background: #2563eb;
color: #fff;
border: none;
border-radius: 6px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
}
button:hover { background: #1d4ed8; }
</style>
</head>
<body>
<h1>Contact Us</h1>
<form action="https://myformconnect.io/f/YOUR_FORM_UUID" method="POST" data-mfc="true">
<label for="name">Name *</label>
<input type="text" id="name" name="name" required>
<label for="email">Email *</label>
<input type="email" id="email" name="email" required>
<label for="message">Message</label>
<textarea id="message" name="message"></textarea>
<button type="submit">Send Message</button>
</form>
<!-- loader.js adds AJAX submission, loading state, and validation.
Remove this script tag to use a plain HTML form POST instead. -->
<script src="https://myformconnect.io/loader.js" data-client-id="YOUR_FORM_UUID"></script>
</body>
</html>
Important Note
YOUR_FORM_UUID with your actual form UUID from MyFormConnect. The loader.js script is optional — the form works without it as a standard HTML POST.
Commit and push to GitHub
- Place
contact.htmlin your repository root (or in the/docsfolder if that is your Pages source) - Commit the file:
git add contact.html && git commit -m "Add contact form" - Push:
git push origin main - Wait 1-2 minutes for GitHub Pages to build and deploy
Important Note
contact.html, and commit directly.
Whitelist your GitHub Pages domain in MyFormConnect
- Note your GitHub Pages URL — either
https://username.github.ioorhttps://username.github.io/repository-name - Log in to MyFormConnect and open Domains in the dashboard
- Add the full URL including protocol (e.g.
https://username.github.io) - Save
Important Note
Related Integrations
References & Official Documentation
Next Steps
Configure MyFormConnect
- Set up your timezone
- Configure lead notifications
- Set up advanced spam detection
- Add team members to your account
Advanced Features
- Use our custom form templates
- Try AI Insights for Leads
- Integrate with your CRM
- Set up automated workflows