In this guide, we'll explore how to bypass Webflow's form submission limit and connect your forms directly to your Xano database. By following these steps, you can ensure that user submissions go straight to Xano without counting against your Webflow form limits, giving you more flexibility and scalability for your web applications.
Webflow is a powerful no-code platform that allows you to build stunning websites and web applications. However, one limitation is the form submission limit, which can be a bottleneck for projects that require a high volume of form submissions.
By connecting your Webflow forms directly to your Xano database, you can overcome this limitation and enjoy the following benefits:
Before we begin, make sure you have a Xano account and a project set up. If you're new to Xano, follow these steps:
In Webflow, design your form as you normally would. Ensure that the field IDs in your form match the field names in your Xano table. For example, if you have a "Name" field in your Xano table, your form field ID should also be "Name."
In Xano, navigate to your project's API section and create a new API endpoint. This endpoint will receive the form data from your Webflow site.
javascript
const formData = await tables.FormData.createRecord(input);
Replace "FormData" with the name of your table.
Now it's time to integrate your Webflow form with your Xano API endpoint. You'll need to add some custom JavaScript code to your Webflow project.
javascript
// Stop Webflow from handling form submission
window.addEventListener("load", function() {
document.getElementById("FORM_ID").addEventListener("submit", handleSubmit);
});
const handleSubmit = async (event) => {
event.preventDefault();
// Get form data
const formData = new FormData(event.target);
// Get submit button
const submitButton = event.target.querySelector("input[type='submit']");
// Update submit button text
submitButton.value = "Submitting...";
// Get form method and action
const method = event.target.getAttribute("method");
const action = event.target.getAttribute("action");
// Get redirect URL
const redirectURL = event.target.getAttribute("redirect");
try {
// Send form data to Xano API
const response = await fetch(action, {
method: method,
body: formData,
});
// Handle response
if (response.ok) {
submitButton.value = "Submit";
alert("Form submitted successfully!");
if (redirectURL) {
window.location.href = redirectURL;
}
} else {
submitButton.value = "Submit";
alert("Error submitting form. Please try again later.");
}
} catch (error) {
submitButton.value = "Submit";
alert("Error submitting form. Please try again later.");
}
};
Now, when a user submits your form, the data will be sent directly to your Xano database without counting against your Webflow form submission limit.
To ensure everything is working correctly, test your form by submitting some sample data. Then, check your Xano table to verify that the new records have been created.
In addition to creating new records, you can also use Xano to update existing records in your database. To do this, you'll need to modify your Xano API endpoint and the JavaScript code in your Webflow project.
javascript
const formData = await tables.FormData.updateRecord(input.ID, input);
javascript
const formData = new FormData(event.target);
formData.append("ID", "YOUR_RECORD_ID");
Replace `"YOUR_RECORD_ID"` with the ID of the record you want to update.
Now, when a user submits the form, it will update the existing record in your Xano database instead of creating a new one.
By following these steps, you can build and deploy web applications without worrying about Webflow's form submission limits. Enjoy the power of Xano's no-code backend development capabilities combined with Webflow's intuitive design tools to create robust and scalable web applications.
This transcript was AI generated to allow users to quickly answer technical questions about Xano.
I found it helpful
I need more support