I have 8 modals of staff members set up. When you click on their photo, the modal opens with their job description. Then in the footer I have a “next” button that brings you to the next staff member’s description so you don’t have to go back to the block of photos and click on the next photo. The only thing I can’t figure out is how to have the previous modal CLOSE when the next one opens. As is, it is layered behind the newly opened modal. Help? Thanks.
I can’t put the same ID (“next-modal-id”) as the id for all eight modals, it won’t let you (sorry if this is a dumb question… still learning!) My modals right now all have unique modal numbers (the default that Blocs gives them)…
Thanks that would be great. I’m sorry, i’m really just not getting it. I’ve tried multiple configurations and none have worked. I understand how the modal works and it works fine except i want the previous to close when i click the next button and the next modal opens… thanks so much for your help i really appreciate it.
So I built an example, since it wasn’t going to take very long to do.
A couple of things. Un-tick the fade option on the modals or it will flicker when it changes. I have also added a couple of screen shots of the settings for the Next button.
{{ REMOVED FILE - reposted }}
Panel settings for the next button on the modal. This is probably where it was confusing. because you can use the interactions type to set the href. Set the type to “Toggle Modal” and then the modal ID of the next modal you want the button to go to.
You only need to add the one extra custom attribute, because the Modal bric already adds the data-toggle one.