WordPress.org

Ready to get started?Download WordPress

Forums

SimpleModal Contact Form (SMCF)
Closing the thank you by clicking anywhere on page (4 posts)

  1. fsoto
    Member
    Posted 2 years ago #

    Is there a way to set that thankyou for sending email message after message is sent by clicking anywhere on the screen not just the "X" that closes it currently?

    And if so would that work as well for the email form itself if I so choose to set it that way?

    Thank you in advance

    http://wordpress.org/extend/plugins/simplemodal-contact-form-smcf/

  2. Eric Martin
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. neologan
    Member
    Posted 2 years ago #

    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?

  4. Eric Martin
    Member
    Plugin Author

    Posted 1 year ago #

    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)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic