It would be cool if we could use Symfony’s forms component with Grav, in order to create more flexible forms.
Right now, I’m just trying to get it to work in a theme, but in the future there will be a standalone ‘advanced forms’ plugin. So Far composer require symfony/form
In the theme’s main file require_once __DIR__ . '/vendor/autoload.php';
use Symfony\Component\Form\Forms;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
This runs when the onTwigSiteVariables event fires: