Written by: Geoffrey Callaghan
Create A Static Website With Contact Form On Github Pages
Create A Static Website With Contact Form On Github Pages
FabForm is a service that allows you to handle form submissions easily. Here’s how you can create a static website with a contact form on GitHub Pages using FabForm:
Create a GitHub Repository:
your-username.github.io
.Create Your Website:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Website</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a simple static website.</p>
<form action="https://fabform.io/f/YOUR_FORM_ENDPOINT" method="post">
<!-- Replace "YOUR_FORM_ENDPOINT" with your actual FabForm form endpoint -->
<label for="name">Name:</label>
<input type="text" id="name" name="name" required><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required><br>
<label for="message">Message:</label>
<textarea id="message" name="message" required></textarea><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
Sign Up on FabForm:
Replace Form Action URL:
"https://fabform.io/f/YOUR_FORM_ENDPOINT"
in the form tag with the actual form endpoint URL you obtained from FabForm.Commit and Push Your Code:
git add .
git commit -m "Initial commit"
git push origin main
Enable GitHub Pages:
main
branch as the source.Access Your Website:
https://your-username.github.io
.Now, when users submit the form on your website, the form data will be sent to FabForm, and you can manage form submissions through the FabForm dashboard.
If you would like to give the option for people to contact you by email too. You can use VeilMail.io to hide email address with captcha. VeilMail makes sure it’s a human reading your email address and not a bot or a email scraper.