Body of form containing HTML markup

When submitting a form via the fetch method (React/Gatsby). The submissions are going through successfully but it seems that the data isn’t exactly matching up with the body.

I’m getting this strange data when I view submissions:

Netlify instance: https://practical-thompson-134dc2.netlify.com/

My submit handler is:

            fetch("/", {
              method: "POST",
              headers: {
                "Content-Type": "application/x-www-form-urlencoded",
              },
              body: encode({ "form-name": "contact", ...values }),
            })
              .then(() => alert("Success!"))
              .catch(error => alert(error))

and the encoded body is:

{contactName: "jonathan", phone: "0411111111", email: "qwdqwd@gmail.com", message: ""}

Is there something I’m missing? Why is HTML being passed through?

Hmm, not seeing that behavior happening now, Jonathan - did you figure out a fix?

Yes but running across a different issue now where the the options in a select input is being captured as part of the field name…

The field name should be State but its collecting all the options as well.