Because with a virtual page it enables those forms to exist in every environment I deploy to without creating a content file for them.
The long answer:
Now, when deploying to different environment in the CI system, that currently requires me to create a content file, on every environment, to make the form render. With a virtual page, I could ensure those forms are just there, in every environment, that they don’t depend on a content file to exist.
For the virtual page setup itself: Nothing complicated. Really just what I got from the simple virtual page example in the documentation, with additional GET|OPTIONS configuration.
All this stuff works flawlessly when I manually handle my forms. When trying to do it with Uniform, it seems like the plugin is not available in the virtual page. This could either be a bug or a missing feature of the plugin, or there is something I’m missing I need to do in the virtual page setup to pass the instance.
Probably something like this (which was given as answer after I created this post here):
I eventually settled with not using Uniform and built myself some shared controllers and snippets for a similar experience, as I found I still have this second problem with not being able to deactivate the CSRF check in Uniform (noted in a different issue). So, I’m not certain if I’m going to test the proposed, guessed solution for a while and closing this. For now.
Thanks, anyway for everyone who already invested time to read through my post and suggest solutions.