Wix form "Insertion Error"...

Hi guys,

I have created a custom quote form here visually3D.co.uk/costs-and-pricing on submission of the quote form it is flagging a Insertion Error, despite the data still being collected and sent into the database.

Any help would be great.

Here is the code for my form.

import { ResidentialSize, CommercialSize } from 'public/calculate-tour.js';
import wixWindow from 'wix-window';
$w.onReady(function () {
$w('#captcha1').onTimeout(() => {
$w('#buttonRequestQuoteSend').disable();
})
$w('#captcha1').onError(error => {
showError(error);
$w('#captcha1').reset()
$w('#buttonRequestQuoteSend').disable();
});
$w('#captcha1').onVerified(() => {
$w('#buttonRequestQuoteSend').enable();
})
});
import { processSubmissionRequest } from 'backend/captchaModule'
export function buttonRequestQuoteSend_click(event) {
$w('#submisisonStatusText').hide();
let submissionRequest = {
token: $w('#captcha1').token,
form: {
fullName: $w('#inputFirstName').value + " " + $w('#inputLastName').value,
email: ('#inputEmailnput').value,
phone: ('#inputPhone').value,
company: ('#inputCompany').value,
county: ('#inputCounty').value,
date: ('#datePickerQuote').value,
propertytype: ('#dropdownPropertyTypeQuote').value,
propertysize: ('#dropdownPropertySelectedQuote').value,
propertyfootprint: ('#textFootprint').value,
message: $w('#inputMessage').value
}
}
processSubmissionRequest(submissionRequest)
.then((item) => {
//If everything is in order and the item is submitted, we refresh the applications-counter, show a success message and reset the captcha.
$w('#buttonRequestQuoteSend').disable();
$w('#submisisonStatusText').html = `<span style='color: green; font-size: 1.5em; text-align: 'center''>Beta Application submitted successfully!</span>`;
$w('#submisisonStatusText').show();
$w('#captcha1').reset();
})
.catch((error) => {
$w('#captcha1').reset();
showError(error);
})
}
function showError(error) {
let errorMessage = ''
if (error.type === 'authorization error') {
errorMessage = 'Something went wrong with the CAPTCHA authorization process, please try again'
}
if (error.type === 'insertion error') {
errorMessage = 'Something went wrong with the submission process, please try again'
}
$w('#submisisonStatusText').html = `<span style='color: red; font-size: 1.5em; text-align: center'>${errorMessage}</span>`;
$w('#submisisonStatusText').show();
}
$w.onReady(function () {
//TODO: write your page related code here...
$w('#dropdownPropertySelector1').disable()
$w('#dropdownPropertySelector1').options = ResidentialSize;
$w('#dropdownPropertyType1').onChange(() => {
if ($w('#dropdownPropertyType1').value === 'Residential') {
$w('#dropdownPropertySelector1').options = ResidentialSize;
$w('#dropdownPropertySelector1').placeholder = "Select property type";
$w('#dropdownPropertySelector1').enable();
} else if ($w('#dropdownPropertyType1').value === 'Commercial') {
$w('#dropdownPropertySelector1').options = CommercialSize;
$w('#dropdownPropertySelector1').placeholder = "Select size of property";
$w('#dropdownPropertySelector1').enable();
} else {
$w('#dropdownPropertySelector1').value = '';
$w('#dropdownPropertySelector1').disable();
}
});
$w("#textCost1").text = " "
$w('#dropdownPropertySelectedQuote').disable()
$w('#dropdownPropertySelectedQuote').options = ResidentialSize;
$w('#dropdownPropertyTypeQuote').onChange(() => {
if ($w('#dropdownPropertyTypeQuote').value === 'Residential') {
$w('#dropdownPropertySelectedQuote').options = ResidentialSize;
$w('#dropdownPropertySelectedQuote').placeholder = "Select property type";
$w('#dropdownPropertySelectedQuote').enable();
} else if ($w('#dropdownPropertyTypeQuote').value === 'Commercial') {
$w('#dropdownPropertySelectedQuote').options = CommercialSize;
$w('#dropdownPropertySelectedQuote').placeholder = "Select a property type";
$w('#dropdownPropertySelectedQuote').enable();
} else {
$w('#dropdownPropertySelectedQuote').value = '';
$w('#dropdownPropertySelectedQuote').disable();
}
});
});

Thanks in advance

Calum

stay safe