Hi,
I have a form to which I add inputs with data downloaded from localStorage (these are customer order data, such as the number of services and prices). All elements generate correctly, but when configuring KwesForms I get the error “Something went wrong Please contact our support team! We’re happy to help.”
Additionally, when the input with data goes to the form, he gets a general error: “Your form has some setup errors :(” and an error for each of them: “This field must have a” name “attribute.”
Of course, each input has all the required attributes.
Below is a function that adds inputs with downloaded data from localStorage:
let generateFormInputItems = () => {
if (appStorage.length !== 0) {
return (orderItemsBox.innerHTML = appStorage
.map(x => {
let { id } = x;
let search = orderItemsData.find(x => x.id === id) || [];
return `
<input type="hidden" id="service-${search.id}" "name="${search.category}" value="${search.name}: ${search.price} zł">
`;
})
.join(''));
} else {
orderItemsSummary.innerHTML = ``;
orderItemsBox.innerHTML = ``;
};
};
generateFormInputItems();
Please let me know what am I doing wrong?
Regards,
Martin