Webflow Integration

Create a bridge between your Webflow forms and Basin's database for a seamless submission experience.

Collecting submissions on exported sites

If you’re wanting to use the built-in Webflow form element on a site you’ve exported, you simply need to adjust your Webflow form settings to connect to Basin for submission handling.

Adjusting your Webflow form settings

Copy/paste the Basin endpoint URL you want Webflow to use for submission handling. Then, log in to Webflow and access the form settings page. Paste the endpoint URL into the action field, and make sure that the method is set to POST.

Once you make these changes, you can publish/export your Webflow site code and your form will send all submission data to Basin.

Using AJAX with native interactions

Paste the following code into your Webflow site's Project Settings > Custom Code > Footer Code. This code will identify any form on your site posting to Basin and submit it via AJAX instead, including the error and success messages.

<script type="text/javascript">
/* apply only to forms with the action pointing to Basin */
form = $(el);
/* stop the form from submitting */
form = $(e.target);
/* get the form's action parameter and add ".json" to the end */
action = form.attr('action') + '.json';
/* submit the form via ajax */
url: action,
method: "POST",
data: form.serialize(),
dataType: "json",
success: function(data){
/* successful submission - hide the form and show the success message */
parent = $(form.parent());
} else {
/* failed submission - log the output to the console and show the failure message */
error: function(){
/* failed submission - show the failure message */

Big thanks to Joe Hohman for taking the time to put this solution together!