access to BB's lightbox when building custom module

I’ve tried searching numerous times, but can’t find anything that directly answers this question. I apologize if I’m posting something that’s already on here.

Basically, I want to have access to BB’s built in lightbox for my custom module so I’m not adding another unnecessary lightbox. I tried wrapping the image in a link to the src url and adding target="_self" but I’m sure there’s some JS involved. Any direction would be useful.

Side note - noticed this minor code error in the custom module doc examples:

'my_photo_field' => array(
    'type'          => 'photo',
    'label'         => __('Photo Field', 'fl-builder') //<--missing comma
    'show_remove'	=> false

Hey Brian,

Welcome to the BB forums! :slight_smile:

I’ve already assigned another member of the team who can assist you with your concern.


Hey Brian,

We’re using this lightbox here…

We don’t do a blanket call to all image links, so you’ll need to instantiate it yourself. That can be done like so…

jQuery(function() {
		type: 'image',
		closeOnContentClick: true,
		closeBtnInside: false

Let me know if you have any questions about that.


Awesome! Thank you for your help.