modal onload force choice

2 replies · opened Dec 3, 2020

SsilkysackDec 3, 2020

hello, i would like to make the subscribe modal on-load (modal-onload-subscribe.html) have the close X in top right corner removed. Also remove the ability to close by clicking the space around the modal. Basically I am looking to have two buttons wthin the modal and want the user to be forced to make a choice without being able to close the modal in any other way. Can this be done?

SSemicolon WebSTAFFDec 3, 2020

Hello,

This is Definitely Possible!

Simply open the js/plugins.lightbox.js File and find the following code:
[ch_pre]$.magnificPopup.open({[/ch_pre]

then add the following code just after the above line:
[ch_pre]closeOnBgClick: false,[/ch_pre]

This will disable closing the Modal on Background Clicks.

If you are using the js/plugins.js or the js/plugins.min.js File, you will need to update the above codes in these files as well.

Use this CSS code to completely hide the Close Button:
[ch_pre]button.mfp-close {
display: none;
}[/ch_pre]

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

SsilkysackDec 4, 2020

yes, thanks!

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard