I’m having trouble with getting AJAX form handling to work completely in modular pages.
I have a modular page
/contact/modular.md, and several modules, including
I understand that, since form 2.0, when using modular pages we can place the form frontmatter directly in the modular form.md. We don’t have to put the form in the modular.md that is “parent” to form.md.
However, when my
/contact/_contact-me/form.md uses the code described in the docs to submit via AJAX (changing
action: to point to
/contact), the site does not display any message after submit, and I get a 500 Internal Server error in the browser Console for trying to access
mysite.com/contact, even though that url is routable).
When I set things up the old way (form plugin < 2.0), and place the form frontmatter in
/contact/modular.md, the problem vanishes: no 500 error, and the post-submit message displays.
Is it not possible to have AJAX form submission work correctly on a modular page, with the form contained in the module?