Open modal by clicking an image (Am I missing something obvious?)


How can I load up a modal by clicking an image (a video thumbnail)?

Or alternatively, how can I change the ‘Toggle button’ that is created when I add the modal element so it is the thumbnail image.

I’ve added a Toggle Hash to the Modal . i.e. jetset

Plus tried using that as a link on the image url #jetset
But nothing happens… I also tried with

But nothing happens. Is there a guide on how to do this?

Hello @draper3000,

Thanks for writing in!

You can simply use the Modal element and in the Toggle, you can switch from using the Toggle icon to a graphic. by going to Modal > Toggle > Graphic in the Modal element settings.

Best Regards.

Thanks for the reply.

Ok, I did see that but it seemed odd.

When I change it to image, it still treats it as a circle button (rather than defaulting to an image that fits in the container the element is place in). I have to go and change settings so it’s not a small circle with borders etc.
Plus the image does not scale to the container it’s in. Instead, it gets cropped if the container is smaller than the image.

I’ll continue to play with the size/scaling settings for the imageto see if there’s an approach that works and then save that as a template for repeat user.

Ah… the toggle is set to Flexbox - Direction - is set to horizontal by default. Chaning this to vertical seems to work as norma;l.

Hi @draper3000,

Great and let us know how it goes.

Thank you.