SimpleModal Contact Form (SMCF)

Summary

SimpleModal Contact Form (SMCF) is an Ajax powered modal dialog contact form plugin for WordPress.

It is built on the jQuery JavaScript library and uses the jQuery SimpleModal plugin.

Please visit the WordPress SMCF Plugin page to download as well as for information regarding installation, FAQ’s, screenshots, etc.

Translations

For SMCF v1.2.2+

Italian (Gianni Diurno)
French (E Neuville, ICS-INFORMATIQUE)
Portuguese (Vitor Borges)
German (Mika)
Polish (Tomek Nowak)

For SMCF v1.2 – v1.2.1

Italian (Gianni Diurno)
German (Nathalie)

281 thoughts on “SimpleModal Contact Form (SMCF)”

  1. hi…i reallyyy love your plugin…but i have a little problem…i did everything exactly as you said in the readme and when i click the contact click i get a 404 page…PLS HELP !!!

  2. @K.Z. – 1) when viewing your site in IE7 – it throws all kinds of JS errors.
    2) you need to put the smcf_link class on your contact link:

    <a href="/contact" class="smcf_link">Contact</a>

    Edit: As of SMCF v1.1, the SMCF link class changed to smcf-link

  3. @K.Z. – there is something wrong with the smcf_javascript.php file that is being loaded. Did you place the smcf directory under wp-content/plugins ?

  4. @K.Z. – The first line in smcf/js/smcf_javascript.php is:

    <?php require_once('../../../../wp-config.php'); ?>

    Which should be loading the WordPress configs. However, when I look at the file as it is loaded on your site, it appears that it is pulling something else – looks like CSS – which is causing the JS to fail. You’ll need to get that figured out in order for it to work.

    As you can see from the require above, it expects smcf_javascript to be in:
    wordpress_root/wp-content/plugins/smcf/js

    @chad – What is not working?

  5. It does work with the default theme, but not with my modified theme.

    It just turns darker and then hangs.

    Can you see what I have to change in this them in order to get in working?

    Poetry Blog

    The contact link is at the bottom of each post on the front page.

  6. @Niemi – The problem is that the plugin is looking for hidden data in your page, but it is not there. The data is inserted in your footer and is called when wp_footer runs. So, my guess is that you are not calling wp_footer() in your theme.

    If you have a footer.php page, add the following before the </body> tag:

    <?php wp_footer(); ?>
  7. And one more thing, is there a way of closing the dialog box when the email have been sent? So the users wont have to click ‘X’.

  8. @Niemi – Well, there are a lot of different options. Do you want it to close immediately, or after a pause? If you wanted it to close after displaying the final message, you could change the complete function to look like:

    complete: function (xhr) {
    	jQuery('#contactModalContainer .loading').fadeOut(200, function () {
    		jQuery('#contactModalContainer .title').html('Thank you!');
    		jQuery('#contactModalContainer .message').html(xhr.responseText + '<br/>Closing in 3 seconds...').fadeIn(200);
    		setTimeout('jQuery.modal.close()',3000);
    	});
    },
    

    If you just want it to close immediately (which won’t let them know whether the message was sent or not, you could change the above to just:

    complete: function (xhr) {
    	jQuery.modal.close();
    },
  9. It may be worth adjusting, as it may be causing some of the above commenter’s problems, the name of the directory when un-zipped is simplemodal-contact-form-smcf as opposed to smcf as referenced in the smcf_data.php file. Thanks for this great plugin, still no able to receive e-mail from it but I have a feeling its more a result of a problem on my server end.

  10. Great plugin, and I’m almost there. The only problem is that I’m not receiving the emails (a pretty big problem). I’ve sent several tests and got nothing. I’ve copy/pasted the two examples you gave at .org plugin page so that there’s an href link on my contact page (see link on my name) and a dynamically created one on my 404 page.

    When I send an email, it gives me a message that the email was sent. Do I need to do more than just straight copy/paste? I feel like I’m missing something that should be obvious.

    I appreciate your help.

  11. Opened up my email this morning and found a bajillion test emails I sent myself. So it’s working, I was just experiencing major lag for some reason.

    Again, it’s a beautiful plugin.

  12. @bob – thanks for that note…I wasn’t aware of that. I’ve update SMCF documentation to reference the actual plugin folder name. I’ve also update the code so that it can dynamically determine where it is installed.

    @Matt – glad it is working!

    @DogDay – looks like you got the background issue resolved…

  13. Yes, and I have restored (translated to spanish) the credit link that I removed by error trying to solve my problem.

    By the way, your plugin crashes with Live Search Popup plugin.

    If I enable yours, Live Search Popup stops working.

  14. I really love this plugin. One question though, is there any future to allow for multiple forms? For example, I would like a form for the main contact of the site, but I would also like to be able to have forms for each individual team member listed on the site (about 15 or so). I think this would be a really slick way for customers to contact them and avoid displaying their email address directly on the page.

    Keep up the awesome work!

  15. It’d also be nice to offer the option of the sender cc-ing themselves. I know I hate it when I use a form that just doesn’t give me some proof of success.

  16. @Matt – I agree…the cc feature is something is on the to-do list.

    @Vasile – the ability to add/remove fields through the admin interface is something I’m considering, but for the time being, you can just download the changes I made, which include a subject field. The field is not required and the default will be used if not entered.

  17. Thanks for a great plug-in. This is easilly the coolest looking contactform for wordpress and it is great since it doesn´t require any special page or subject to be set up.

    Since you solved a problem för me (the footer thing) I´m also really greatful for your quick support!

    /Mattias

  18. Hi Eric,
    Regarding the question Niemi had about having the dialog box close after sending the message, where exactly do I add the code you’ve provided? I went to the plugin editor in wordpress, and I’m assuming that the code is to be added to the file it displays, but I don’t know exactly where to place it without causing damage if I’m wrong (excuse my ignorance, but I don’t know much about php files). I don’t see any complete function code in the file which I would then edit.
    Thanks,
    Patou

  19. @Patou – those changes are for the js/smcf_javascript.php file. You’ll have to edit that file by hand, it is not available through the plugin editor in WordPress.

  20. Let me start off with a thank you for this contact plugin and then a comment that I don’t know what I’m doing! This is my first wordpress site and I’m not a programmer. I’m trying to use your plugin with the Lightbox2 plugin (https://stimuli.ca/lightbox/). When I go to the Options – SimpleModal Contact Form Configuration – and then select the Include jQuery and the Include SimpleModal the Lightbox2 image view stops working. Any ideas?

  21. @Spencer – the problem has to do with conflicts between the different JavaScript libraries. If you are not using jQuery anywhere else on your site, you can add the following to the js/smcf_javascript.php file (right below the var smcf_url ... line):

    jQuery.noConflict();

    That should do the trick 😉

  22. Thanks. The smcf_javascript.php file now has the code below;

    var smcf_url = ”;

    jQuery.noConflict();

    I have deselected the “Include jQuery” in the configuration tag and then I have the “Include SimpleModal” selected.

    The Lightbox2 now works but the contact page is reporting errors. This is what I’ve got in the contact page;

    <a href="/contact">contact</a>

  23. @Spencer –
    1) I hope that smcf_url in smcf_javascript isn’t actually empty 😉 It should be:
    var smcf_url = '<?php echo get_bloginfo('wpurl') . SMCF_DIR ?>'
    2) You need to have “Include jQuery” checked, or SMCF will not work
    3) The contact link should look like:
    <a href="/contact" class="smcf_link">contact</a>
    4) Please read the box right above the “Leave a Reply” textarea on how to post code snippets.

  24. hehe, thanks. Like I said in my first comment, I don’t know what I’m doing! 😀

    1) var smcf_url = ”;
    2)”Include jQuery” AND “Include SimpleModal” are checked
    3)the contact link is <a href="/contact">contact</a>
    4)jQuery.noConflict(); is right below the var smcf_url … line in the js/smcf_javascript.php file

    it all seems to work now. Thanks!

  25. Hello there and Hello Eric,

    great plugin you offered! I’ve got it working on my new website on firefox, safari etc. but still not working on IE, it seems that nothing is happening. I’ve read all the reply before but found nothing to help me.

    Your help would be highly appreciated.

    Thanks in advance

  26. @damo – it looks like jQuery is being loaded twice on your site. You can try de-selecting the include jQuery option in the SMCF options. However, the other version that is being loaded (it looks by Thickbox) is older and I’m not sure that SMCF will run correctly on that version.

    So either try removing the Thickbox jQuery version or the SMCF one and see if that fixes the issue.

  27. @Eric

    I’ve tried removing the SMCF jQuery in the option menu by de selecting the “include jQuery” option and now it just doesn’t work in firefox neither. How do I remove the Thickbox jQuery version? I just don’t get it.

    Thks in advance

  28. With so many people using lightbox, it’d be nice to have an update that played nicely with LB automagically. Especially for us non-code-monkey types. Great plugin, BTW. Thanks for your work.

  29. @damo – I downloaded and activated the Thickbox plugin. I just edited the thickbox.php plugin file and commented out the following line:

    //echo '<script src="'.$url.'/thickbox/jquery.js" type="text/javascript"></script>'."\n";

    @jp – I have two thoughts:
    1) I should update SMCF to put the JS files in the footer, as opposed to the header. That would speed up page loading and help with one Thickbox compatibility issue.
    2) The Thickbox plugin I tried did not have an option to include/not include jQuery (like SMCF does). As long as any other plugin uses a compatible version of jQuery (1.2+), all should be fine.

  30. Hello Eric,

    thanks for your reply. I’ve done what u told me and it still doesn’t work on I.E but still working on firefox… What else? 🙂

  31. @damo – I tested it with IE6 & 7 and it worked fine. When you say it doesn’t work, what is the problem? Have you turned on JS debugging in IE to see if it is throwing any errors?

  32. Hi Eric,

    I can’t believe it’s working for you and not for me or my clients…this is so weird. I’ve just tried again with IE 7 and here’s the dubugging message:

    Script Error Informations:
    ====================
    OS Information: Microsoft Windows XP Professional Service Pack 2 (Build 2600)
    OS Language: fr
    Browser: Microsoft Internet Explorer 4.0 (compatible; MSIE 7.0; Windows NT 5.1) 0
    Web Browser Language: fr
    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
    Cookies enabled
    Java enabled
    ————-
    Script Error:
    //—————-
    Line: 11
    Character: 4
    Code: 0
    Error Message: Cet objet ne gère pas cette propriété ou cette méthode (if you can’t speak french basically it says that this object can’t handle this priority or method).

    I’ve tried to enable a lot of things in the internet options / security window but it doesn’t seem to change anything.

    Sould I try something else? or do you need information about my wordpress plugins? Should I uninstall the plugin and install it again?

    See I’m desperate…

  33. @damo – it looks like you still have another version of jQuery being used by wp-shopping-cart. Once you stop it from loading it’s copy of jQuery, all should be fine.

  34. @Eric – Ok thanks Eric but how do I stop it from loading? (I’m far from being a php/html pro…) What kind of line do I have to find, is it the same kind of thing you told me to do with thickbox?

    Thanks and sorry for being such a pain 🙂

Comments are closed.

Scroll to Top