EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

HiddenField not shown in CollectionField

Open bencagri opened this issue 2 years ago • 0 comments

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.

bencagri avatar Oct 31 '23 10:10 bencagri