⏳Quick Start

Collect your first form submission in just 5 minutes.

Create a Project

To get started, create a new project with the URL of the website where you want to accept submissions. Later, there will be a section on testing for a development setup.

Add BetterForm to Code

Next, copy and paste the script tag into any page where you want BetterForm to capture submissions. We strongly recommend leaving async and defer for optimized website performance. We will still capture any forms submitted to those pages!

<script async defer src="https://betterform.io/embed.js"></script>

Prepare the Form

  • To start using a form, add the betterform attribute to the form tag in your HTML.

<form betterform>
  • Next, add a hidden input with a value that corresponds to the name of your form.

 <input type="hidden" name="form[name]" value="Contact Form" />
  • Finally, add name attributes to all inputs that you want to submit to your project.

Show Submission Status

To indicate to the user if the submission was successful, create HTML elements and add the appropriate attribute to make them visible after submission. The HTML elements must be inside the form to be displayed. Ensure the element is hidden by default with style="display: none".

Hide by Default: style="display: none"

βœ… Success: data-bf-success

⛔️ Error: data-bf-error

Example with Tailwind

Development Testing

Submit your form from localhost for development testing. We will validate that everything is set up properly and return success if it works as expected.

Example Form

Add semantic name attributes to easily view your submissions

ex: Name, Phone Number, Email, Message

Last updated