WordPress.org

Support

Support » Plugins and Hacks » [Plugin: SimpleModal Contact Form (SMCF)] Closing the thank you by clicking anywhere on page

[Plugin: SimpleModal Contact Form (SMCF)] Closing the thank you by clicking anywhere on page

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Eric Martin

    @emartin24

    You just need to add the overlayClose SimpleModal option. You can do this by opening smcf/js/smcf.js and changing:

    $('.smcf_link, .smcf-link').click(function (e) { // added .smcf_link for previous version
    	e.preventDefault();
    	// display the contact form
    	$('#smcf-content').modal({
    		closeHTML: "<a href='#' title='Close' class='modalCloseX simplemodal-close'>x</a>",
    		position: ["15%",],
    		overlayId: 'smcf-overlay',
    		containerId: 'smcf-container',
    		onOpen: contact.open,
    		onShow: contact.show,
    		onClose: contact.close,
    		zIndex: 10000
    	});
    });

    To:

    $('.smcf_link, .smcf-link').click(function (e) { // added .smcf_link for previous version
    	e.preventDefault();
    	// display the contact form
    	$('#smcf-content').modal({
    		closeHTML: "<a href='#' title='Close' class='modalCloseX simplemodal-close'>x</a>",
    		position: ["15%",],
    		overlayId: 'smcf-overlay',
    		containerId: 'smcf-container',
    		onOpen: contact.open,
    		onShow: contact.show,
    		onClose: contact.close,
    		overlayClose: true,
    		zIndex: 10000
    	});
    });

    Hope that helps.

    Thanks for this 🙂

    I have a small issue whereby when i open the form, if i move my mouse cursor off the form, i get the loading mouse cursor (the rotating circle). This happens with or without the above code change.

    Just wondering if this is normal or if something is going wrong?

    *EDIT* it’s doing the same thing on your demo contact form, Eric. At least i know it’s not just my install. Using latest Firefox. It shouldn’t really be doing this, must be a fix?

    Plugin Author Eric Martin

    @emartin24

    You just need to update the CSS. You can do this by opening smcf/css/smcf.css and changing:

    #smcf-overlay {background-color:#000; cursor:wait;}

    to:
    #smcf-overlay {background-color:#000;}

    Or use some other value for cursor (https://developer.mozilla.org/en/CSS/cursor)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: SimpleModal Contact Form (SMCF)] Closing the thank you by clicking anywhere on page’ is closed to new replies.