I’m trying to implement carousel’s on the frontend of my application, and controlled through Forest Admin but can’t seem to make it work correctly.
Expected behavior
Basically, I have a Carousel model and a CarouselPhotos model. I have created a hasMany relationship on the Carousel model to the CarouselPhotos model.
This means that I have the related data section on carousel data:
I want to be able to add multiple images at once, without having to add image by image (time consuming). So I was wondering if there was a way to add an action? to the plus button on the right hand side:
Couldn’t you directly add the smart action on your carousel collection?
This way, you would be able to select a record in your carousel list, then click on an action entitled “add photos”.
This could indeed be a solution, but wouldn’t that mean that the carousel HAS to be created before adding photos to it? Meaning that it would not be possible to add the photos and create the carousel in one shot?
You will have to create the carousel then add photos to it. Only “single” smart action work with forms.
The only way I can see for you to directly create a carousel and its pertained photos is to move this business code in a smart action on another collection. with a form.
Is your carousel related to any other table in your database?