EasyAdminBundle
EasyAdminBundle copied to clipboard
HiddenField not shown in CollectionField
Describe the bug
When I use CollectionField with useEntityCrudForm as described in docs the HiddenField is not shown in the form.
To Reproduce Symfony 6.3 EasyAdmin: 4.7.7, 4.8.3
(OPTIONAL) Additional context
UserCrudController.php
public function configureFields(string $pageName): iterable
{
yield IdField::new('id')
->onlyOnIndex()
->setColumns(12);
yield TextField::new('name')->setColumns(6);
yield CollectionField::new('addresses')
->useEntryCrudForm(AddressCrudController::class)
->hideOnIndex()
->setColumns(12);
}
AddressCrudController.php
public function configureFields(string $pageName): iterable
{
yield IdField::new('id')
->onlyOnIndex()
->setColumns(12);
yield TextField::new('line')->setColumns(6);
yield HiddenField::new('type')
->setValue('home')
;
}
On new and edit page there is no hidden input. Rest of the rows are there.