-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiselect #16
Comments
I would also like a feature like this. Is this even possible to combine with a CollectionField ? thanks for this bundle anyways ! love and peace |
Hello, thanks for ou interest in the project. For example public function configureFields(string $pageName): \Iterator {
yield CollectionField::new('gallery')
->hideOnIndex()
->setEntryType(EasyMediaType::class)
->allowAdd()
->allowDelete()
;
} |
not work -> .field-collection-item is not found |
I will add : line19 : vendor/agence-adeliom/easy-media-bundle/src/Resources/views/form/easy-media.html.twig add to Crud: But
drop image, button stay. on Save |
I'm seeing same error as @treeindark. When clicking on
|
bump. Look like it’s corrected, i upgraded to 2.0.94 and all work fine now. but only if you use : CollectionField::new('yourField')
->hideOnIndex()
->useEntryCrudForm()->setEntryIsComplex()->renderExpanded()
->allowAdd()
->allowDelete(), |
@NodokaMurmevent can i ask how you manage to get it working by using the useEntryCrudForm? What does the source of the EntryCrudForm controller look like? |
/**
* @var \Doctrine\Common\Collections\Collection<int, \App\Entity\PropertyGallery>|\App\Entity\PropertyGallery[]
*/
#[ORM\OneToMany(mappedBy: 'property', targetEntity: PropertyGallery::class, orphanRemoval: true, cascade:["all"])]
private Collection $gallery; Have you made the same mistake? |
Thanks for the reply @NodokaMurmevent
This will generate a form payload with form['attachments'][0]['attachments'][0] = 24 |
This is because the ModelTransformer in EasyMediaType.php does not return the Media entity. Works when you override and change Form/EasyMediaType.php (line 88)
to
|
Is possible to make EasyMediaField multiselect or atleast can i combine somehow EasyMediaField with CollectionField?
btw. thank you alot for great bundle.
greeting Kristijan
The text was updated successfully, but these errors were encountered: