Written by: Geoffrey Callaghan
Create A Contact Form With Gitlab Pages
Create A Contact Form With Gitlab Pages
Creating a “Contact Us” Form with GitLab Pages and integrating it with Fabform.io involves a few steps. Here’s a step-by-step guide:
GitLab Account: Make sure you have a GitLab account and a repository where you want to host your website.
Fabform.io Account: Sign up for a Fabform.io account if you don’t have one.
Settings
> Pages
.main
or master
) as your source branch.index.html
file for your Contact Us page.Example index.html
:
<!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>
</head>
<body>
<h1>Contact Us</h1>
<!-- Your contact form code goes here -->
<form action="YOUR_FABFORM_ENDPOINT" method="POST">
<!-- Form fields go here -->
<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>
<!-- Add more fields as needed -->
<button type="submit">Submit</button>
</form>
</body>
</html>
YOUR_FABFORM_ENDPOINT
in your index.html
file with the actual endpoint you obtained from Fabform.io.<form action="YOUR_FABFORM_ENDPOINT" method="POST">
<!-- Form fields go here -->
<!-- ... -->
</form>
Settings
> Pages
in your GitLab repository.That’s it! Now, when users submit the form on your Contact Us page, the form data will be sent to Fabform.io for processing. You can log in to Fabform.io to view and manage the form submissions.