Hi everyone,
I want to setup Formspark on my client’s website for GDPR reasons. I have four forms across the website, and I would like to use Formspark for all of them. I followed all the instructions on Formspark’s website but every time I submit a form, I get an error message: “Oops! Something went wrong while submitting the form”.
The forms were working fine before with the Webflow default.
I copy-pasted the urls into each form‘s action attribute, and changed the method from GET to POST. All my form elements have a name attribute.
I also copy-pasted the following code in to the footer code in project settings:
<script type="text/javascript">
$('form[action^="https://submit-form.com"]').each(function (i, el) {
var form = $(el);
form.submit(function (e) {
e.preventDefault();
form = $(e.target);
var action = form.attr("action");
var data = form.serialize();
$.ajax({
url: action,
method: "POST",
data: data,
dataType: "json",
success: function () {
var parent = $(form.parent());
parent.children("form").css("display", "none");
parent.children(".w-form-done").css("display", "block");
},
error: function () {
var parent = $(form.parent());
parent.find(".w-form-fail").css("display", "block");
},
});
});
});
</script>
I also disabled reCAPTCHA validation in project settings and removed the reCAPTCHA component from the forms. In Project settings > Form, spam filtering is turned off. I would like to use some spam protection, probably botpoison, but I thought I would try to set up Formspark with no spam protection first and just get that working.
Does anyone have any suggestions? Thanks in advance