use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; $formBuilder->add('firstName', TextType::class);
use Symfony\Component\Form\Extension\Core\Type\CheckboxType; $formBuilder->add('isActive', CheckboxType::class, [ 'required' => false, 'label' => 'Is Active?' ]);In this example, we use the `add()` method again to add a checkbox field for the `isActive` attribute. We also provide some additional options such as the field label and whether the field is required. The package library that provides the FormBuilderInterface is the Symfony Form component, which is part of the Symfony PHP framework.