Wix forms are highly customizable, and with Velo you can send submissions to external endpoints like Formbase. This gives you full control over field names and success handling.
Create a Formbase endpoint
Create a new form in the Formbase dashboard and copy the endpoint URL.
Build your Wix form
Add input elements to your page and give them IDs (for example, #nameInput, #emailInput).
Send the submission with Velo
$w.onReady(function () {
$w('#submitButton').onClick(async () => {
const payload = {
name: $w('#nameInput').value,
email: $w('#emailInput').value,
};
const response = await fetch('https://formbase.dev/s/YOUR_FORM_ID', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
redirect: 'manual',
});
if (response.status === 303 || response.ok) {
$w('#status').text = 'Submitted!';
} else {
$w('#status').text = 'Submission failed.';
}
});
});
Create a text element with ID #status for feedback.
For file uploads, use FormData and a file input element instead of JSON.