@rcdncn, The only thing I can see at the front-end is that the modular page does not load the reCaptcha javascript files. And hence, no token will be send to the server which expects to receive one. The server then starts whining…
The input fields are not being shown. Only the buttons.
Javascript for reCaptcha is not loaded
An error is logged by plugin Form:
[2021-06-23 09:45:15] grav.WARNING: Form reCAPTCHA Errors: [/contact] [“missing-input-response”]
Fix (partly): Theme Agency comes with its own form.html.twig template for modular pages. When disabling (renaming) that template, the reCaptche scripts are being loaded correctly and reCaptcha is working properly.
Although the layout of the form is no longer in the Agency style…
So, it seems it’s not a Form issue, but rather an Agency issue.
But your example is with form setup on modular page itself, not on a module. I think that’s a huge drawback overall of using modular pages. There’s simply no way to make them work without any workarounds if you want just a tiny bit more complex module.
In this case, if you decide not to use the module with form anymore, it would not be enough to delete that page, but you’d also have to remember to remove form config from modular too.
@Karmalakas, There is more to it then adding a default position. Not all fields require a position because some are not intended to being displayed, like: hidden, captcha, honeypot. You don’t want to add extra divs that require space for these fields.
Didn’t dig into their code, but it sounds like, if hidden field doesn’t have a position, then it’s also ignored Anyway, IMO missing position should not remove the field completely.
Thank you @anon76427325, and @Karmalakas for the quick analysis! I added a position statement to g-recaptcha-response: and it works, though I agree that is pretty unexpected behaviour.