$formBuilder->add('username', TextType::class, [ 'label' => 'Username', ]);
$formBuilder->add('password', PasswordType::class, [ 'label' => 'Password', ]);
$formBuilder->add('gender', ChoiceType::class, [ 'label' => 'Gender', 'choices' => [ 'Male' => 'male', 'Female' => 'female', ], ]);In each example, the add method is used to add a field to the form, along with some options to customize the field. The FormBuilderInterface is used to build the form, and the resulting HTML is generated using the Twig templating engine. Overall, the FormBuilderInterface is a powerful tool for building forms in PHP, and it provides a lot of flexibility and customizability. It is a key component of the Symfony framework, and is used extensively in building web applications.