Symfony 7 Forms: The Basics
Built-in Symfony Form Themes
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 2

Your Starship entity has a $captain field that is a relation to the Person entity. And, Person has a boolean field called $hasPilotLicense.

You want to create a StarshipType form type that is mapped to the Starship entity. The form type will contain the captain field, but you don't want all persons available in the DB to be shown in the select tag. You want to filter them to those who have a pilot license and can pilot a starship. How would you do it?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.