我希望在提交后使用FormEvents::POST_SUBMIT生成一个新字段。基本上,我想显示基于邮政编码的城市列表。这个错误告诉我对象的类型是错误的,但是我看不出我可以使用哪个对象,因为文档告诉我要这样做。我在研究Symfony 5.2<?;
use Symfony\Component\Form\FormEvents;
use S
当在EntityType中使用CollectionType时,是否可以访问EntityType的query_builder函数中的当前集合对象?class UsersType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('users', CollectionType::class, array('entry_type' => U