Form submissions are not recoginzed

gleeful-brioche-1c6a9a

custom domain Jasonstoll.live

Hi, I have finally resolved the issue of Netlify not recognizing my form. The form is now recognized. however, it does not receive any submissions.

See the below code on how I have it set up. I would appreciate any assistance in getting this figured out.

Thank you.

<template>
    <div class="container">
        <div class="column is-8 is-offset-2">
            <form 
            name="subscribe" 
            id="myForm" 
            @submit.prevent="submitForm"
            method="post" 
            data-netlify="true"
            data-netlify-honeypot="bot-field">
                <input type="hidden" name="form-name" value="subscribe" />
                <p>
                    <label>Your Name: <input type="text" name="name" /></label>
                </p>
                <p>
                    <label>Your Email: <input type="email" name="email" /></label>
                </p>
                <p>
                    <label>Message: <textarea name="message"></textarea></label>
                </p>
                    <p>
                        <button type="submit">Subscribe</button>
                    </p>
            </form>
        </div>
    </div>
</template>

<script>

export default {
    methods: {
        submitForm() {
            const myForm = document.getElementById ("myForm")
            const formData = new FormData(myForm);
  
            fetch("/", {
                method: "POST",
                headers: { 
                    "Content-Type": "application/x-www-form-urlencoded" ,
                    "Accept": "application/x-www-form-urlencoded" },
                body: new URLSearchParams(formData).toString(),
                })
            .then(() => this.$router.push({path:'/thankyou'}))
            .catch((error) => alert(error));
        }
    }
}
</script>

Hi @JayStoll,

Thanks for reaching out!

We have a Support Guide on common form issues to help with troubleshooting:

Could you review the guide to see if that helps with resolving the issue?

If you continue to have issues, could you provide us with a link to your live form, and a brief description of what debugging steps you have taken. Thank you.

Awesome! I resolved the issue. Your code showed to send the AJAX submissions to " / " this was not working. When I changed that to send to " /form.html " it now receives the submissions.

Hi @JayStoll,

Thanks for letting us know you were able to resolve the issue and how you resolved it. I hope you have a great day!