I have a Gatsby site running on Netlify. I wrote my first Netlify Function that is meant to be triggered on form submissions. The function gets triggered but the payload data contains information from a different form!
For example, I have two forms in my Netlify account: form-a and form-b. I am submitting form-a on my website and I see the submission for form-a in my Netlify account under the “Verified submissions” section. I expect the contents of form-a to be submitted as the payload to the Netlify Function. However, the payload data contains a submission from form-b even though I explicitly submitted form-a. The data for form-a is nowhere in the payload.
Why might this be happening? I appreciate your help.