Why is Malchannel Middleware intercepting all forms?

I have followed the instructions verbatim from MailChannels · Cloudflare Pages docs

The contact form works perfectly, but my other forms on other pages seem to also be intercepted despite not having a data-static-form-name attribute. Is there a way to carve out any form without that attribute?



Nevermind, I found the solution is to put the function within the directory of the page it should apply to, it will then ignore pages in other parts of the file structure. It’s called Functions Routing and more info here: Routing · Cloudflare Pages docs