yoast seo

Enhanced WordPress Contact Form

Enhanced WordPress Contact Form

February 11th, 2007 – 34 Comments

As a multiple WordPress administrator (I control 10+ WordPress sites), I use the WP contact form plugin written by Ryan Duff a lot. Most of the times these contact forms are used as some form of conversion on these sites. This means you want to know as much as possible about the person sending you the message.

The two most important things for me are the page from which the person came to the contact page (this is the page that urged him to send you a message after all), and what he came from in the beginning, be it a search engine or another site. When it is a search engine he came from, you’d want to filter out the keywords so you don’t have to start deciphering the query string.

So I’ve adapted Ryan Duff’s contact form to do just that, and I proudly present: the enhanced WordPress contact form.

This sort of thing is very useful towards your client too, as it raises the awareness of which keywords people use to find them.

Read more: ‘Top WordPress plugins every site should have’ »

34 Responses to Enhanced WordPress Contact Form

  1. WPexplorer
    By WPexplorer on 30 November, 2009

    It would be nice if the admin could choose the fields on the contact form and add more of them, through the admin panel as opposed to messing with the code.

  2. Julia H.
    By Julia H. on 6 November, 2009


    I just installed the plugin on my blog.
    But I noticed when someone doesn’t fill in the required fields, the form just refreshes…and they
    don’t get an error message. Am I missing something? Is there a fix for this?

    Thanks, Julia

  3. Heinz Legler
    By Heinz Legler on 6 May, 2009

    We receive the emails to Outlook but when we reply the To: field is not picking up the sender. Any solutions ? Thanks Heinz

  4. scarecrow
    By scarecrow on 31 October, 2008

    on my site too, i’ve got the contact form up, but i don’t recieve mail when anyone types in here…
    any ideas or solutions?

  5. DON
    By DON on 15 October, 2008

    I put the plugin on one of my sites today and then tested it but never got the mail from my autoresponder. Do you have any ideas.


    P.s. In case you ask the autoresponder is working fine. I sent mail to the site from my email address and I got the autoresponse. I put my email address in the form , sent it and nothing happened.

  6. Mac
    By Mac on 3 August, 2008

    Hi there,

    I just updated to the newest version of this plugin. Previously the “your name” text used to be above the input field, now the input field has moved up to be on the same line as the prompt text with this latest version, is there any way to switch this back?

    I did read the comment about changing it with styling, where would I make thi change?


  7. Eric
    By Eric on 7 May, 2008


    I’ve been using the plugin for a while on my site and no problems. I recently moved the site to a new server. Everything is the same (I think). I have php.ini using ssmtp to send to my google hosted account. On the new site it sends three emails and sticks one success msg in the title tag and two more where it should go. I’ve checked everything. php mail() is working normally on other pages and I can send with ssmtp from the command line. Any Ideas?

    BTW, Thanks for the great plugin.

  8. rick
    By rick on 11 April, 2008

    Humph, you’ve changed my mind! Your arguments are convincing indeed. Despite I’m not a person who is easy to be convinced.

  9. Pablo DiCiacco
    By Pablo DiCiacco on 25 March, 2008

    At this page: http://tinyurl.com/32yr68
    Are you able to determine why the spacing of the contact form elements break apart?

  10. Bunny
    By Bunny on 23 February, 2008

    Doh! Of course. Well, this might be helpful to other newbies. Thanks for the fast response!

  11. Bunny
    By Bunny on 23 February, 2008

    Oh, phooey. What I tried to insert doesn’t show up in my previous post. Well, it was just what you said to put in with the exclamation mark and two hyphens, etc.

  12. Joost de Valk
    By Joost de Valk on 23 February, 2008

    @Bunny: do it in code view instead of the visual editor and it’ll work ;)

  13. Bunny
    By Bunny on 23 February, 2008

    I’m almost afraid to ask now, but I can’t get it working either. I’m also new at this. The quicktag option is checked but it isn’t showing up anywhere, and I haven’t changed the editor’s default quicktags, at least not to my knowledge. So I tried to insert “” (without the quotes, of course) and that’s exactly what shows up on my page, no actual contact form. See for yourself at http://predictidol.com/contact-bunny/

    Thanks for any help you can give another newbie. Please don’t swear at me. I read the readme file.

  14. David
    By David on 8 January, 2008

    i just dragged the folder to my plugins. i didn’t know there was a fucking readme.txt :p
    i told you i was a nOOb. if i was anymore ignorant i would have this computer lodged in my ear!

    thanks anyway

  15. Joost de Valk
    By Joost de Valk on 8 January, 2008

    Read the fucking readme.txt :P (or just insert <!–contact form–>

  16. David
    By David on 8 January, 2008

    ditto on Wendy’s comment. no instruction for n00bs. forgive the ignorant. I have no idea how to get your plugin on my blog

  17. Ed
    By Ed on 9 November, 2007

    Thanks Joost!

  18. Joost de Valk
    By Joost de Valk on 9 November, 2007

    Use <–contact form–> :)

  19. Ed
    By Ed on 4 November, 2007

    Hi Joost,

    I uploaded the plugin, created a page for it, and with some searching – because there are no instructions that come with your plugin to install it…i went to archive.org to pull up Ryan’s page.

    Noticed i had to use the tag if there was no tag button, so i did.

    Result is that nothing happens?
    Your advice is much appreciated here :)

    Thanks in advance!



  20. Wendy
    By Wendy on 11 August, 2007

    I downloaded the plugin – uploaded, installed and activated – selected the options but I don’t see it – I am a total n00b here so I apologize if I am overlooking something huge but can you help???

  21. Mr.Sato
    By Mr.Sato on 12 April, 2007

    Hey, gotta bit of an issue I hope you can help me with. The form apparently doesn’t know how to send email (wants to use localhost). I get the following error:

    Warning: mail(): Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:\Domains\xxxxxxxx.com\wwwroot\wp-content\plugins\enhanced-wp-contactform\wp-contactform.php on line 185

    but line 185 is:
    mail($recipient, $subject, $fullmsg, $headers);

    and no sign of “ini_set()” anywhere – I searched.

    While I’m computer savvy enough to make sense of most php code when I see it, i’m pretty lost here. I don’t think I can edit the php.ini, as I’m on a shared host server. Seems I’d be able to set the smtp info somewhere… like maybe Options – Contact Form? Call it a feature request. :D

    So anyway, do I insert ini_set() somewhere, or…?

  22. Joost de Valk
    By Joost de Valk on 9 April, 2007

    Chinese SEO: very true, and it’s even more important when an e-mail is actually an order for something.

  23. Chinese SEO
    By Chinese SEO on 9 April, 2007

    Checking which keyword visitors used to reach the blog is very important. Then, you know which topic readers are most interested in and write more about it.

  24. Joost de Valk
    By Joost de Valk on 16 February, 2007

    You could solve it with styling nika:

    div.contactform input {
     clear: left;
  25. nika
    By nika on 16 February, 2007

    Joost: thanks, look forward to that. I wonder if my problem is not a styling issue but some other aspect I can modify so that this lovely form and look lovely on these sites.

  26. Joost de Valk
    By Joost de Valk on 16 February, 2007

    Hey Nika, The next release should allow you to style it yourself a bit more!

  27. nika
    By nika on 14 February, 2007

    I have had great success simply installing the plugin and rendering the contact form on my personal site ( http://nikas-culinaria.com/contact/ )


    I cant figure out how to fix the rendering issues you see on this page ( http://wellfed.net/contact/ ) on a site I administer. I do not like the way the boxes go up on the same line as “Name:” etc, it looks messy.

    Hope you can help me get a better handle on how this page displays!

  28. Ajay
    By Ajay on 14 February, 2007

    I guess that does make sense. Technically you should have a referer.
    Sometimes though a referer may not be passed. For such, an appropriate error should be given stating the Incorrect Referer and to enable sending referers, or alternatively post to mail at example.com etc.

    Also, you would need to check that the referer is actually from the same domain as the contact form or a whitelist.

  29. Joost de Valk
    By Joost de Valk on 14 February, 2007

    Another thing I’m seeing is that they all post directly to the form, so I’m going to block all e-mails without a referer, sounds good to you?

  30. Ajay
    By Ajay on 14 February, 2007

    The tick box won’t work, because somehow spam bots can bypass that. It needs to be random, which is where the math thing works usually.

  31. Joost de Valk
    By Joost de Valk on 14 February, 2007

    I’ve been doing my first try at that for the new version, which you can check out at css3.info, with a “This is not spam” checkbox. I can tell you now that those don’t work :) So i’ll do a simple math thing instead.

  32. Ajay
    By Ajay on 14 February, 2007

    What would be great is if you can implement some kind of math protection or similar.

    Even using Ryan’s form I am being hit by spam mails!

Check out our must read articles about Analytics