HTML
HTML (HyperText Markup Language) is the standard markup language used to structure content on the web. It defines the elements and layout of a webpage, such as headings, paragraphs, images, links, and more, providing the foundation for web development.
Prerequisites
Before you begin, make sure you have:
- A Basestack Forms account
- An HTML form ready to integrate
Don't have a form yet? You can find example forms in the Setup tab of your Basestack Forms Dashboard.
Quick Setup Guide
Follow these simple steps to connect your HTML form to Basestack Forms:
Update your form's action attribute
Configure your form's action attribute to point to your Basestack Forms endpoint. The endpoint URL format is:
https://forms-api.basestack.co/v1/s/[KEY]?mode=restReplace [KEY] with your form's unique key, which you can find in your Basestack Forms Dashboard under the Setup tab.
Also ensure your form's method attribute is set to POST.
Add name attributes to all form fields
Every form input must have a name attribute for Basestack Forms to collect the data. This includes:
- Text inputs (
<input type="text">) - Email inputs (
<input type="email">) - Textareas (
<textarea>) - Checkboxes (
<input type="checkbox">) - Radio buttons (
<input type="radio">) - File inputs (
<input type="file">)
Fields without a name attribute will be ignored and won't be collected in your submissions.
Test your form
Your form is now configured and ready to collect submissions! Use the example code below as a reference or starting point for your own form.
<!-- modify this form HTML as you wish -->
<form
action="https://forms-api.basestack.co/v1/s/[KEY]?mode=rest"
method="POST"
enctype="multipart/form-data"
>
<div>
<label for="name">Name:</label>
<!-- name each of your inputs as you wish -->
<input
type="text"
id="name"
name="name"
required
autocomplete="name"
aria-label="Name"
placeholder="Enter your name"
/>
</div>
<div>
<label for="email">Email:</label>
<input
type="email"
id="email"
name="email"
required
autocomplete="email"
aria-label="Email"
placeholder="Enter your email"
/>
</div>
<div>
<label for="message">Message:</label>
<textarea
id="message"
name="message"
required
aria-label="Message"
placeholder="Enter your message"
></textarea>
</div>
<!-- your other form fields go here -->
<button type="submit">Submit</button>
</form>