Following up on the upcoming release of WordPress 2.0, I’ve released version 1.4 1.4.1 1.4.2 of my WordPress Contact Form plugin. You can grab a copy here and once I get back a few sucessful reports, I’ll update the project page. Please download and let me know that it works. It works with WordPress 2.0 only and is not backwards compatible.
Quick install instructions:
- Delete your previous wp-contactform.php and options-contactform.php files on your server
- Upload all files from the archive to wp-content/plugins/wp-contact-form/
- Thats it! You should be set!
As far as changes are concerned, I’ve reverted the mail() function for now due to the errors with safe mode in PHP. It now uses Owen’s Buttonsnap class to add the buttons to both the rich-text editor and the non-rich-text editor. Converted the previous user level 9 (required to change options) to the manage_options cap. Implemented a wordwrap of 80 characters to the message body. The CSS has also been updated to what I’ve been testing in 2.0, seems to work with more sites and browsers. It should no longer send a billion emails when you have the asides plugin active (Thanks Bernd Zeimetz). The XHTML is also valid again thanks to Miles Baker. And lastly, I’ve fixed the headers so it should now set the charset properly to whatever your blog uses.
Any questions, comments, reports of it actually working; please post them here.
Works fine!
However, the version needs to be bumped and I still have my couple gripes that I had with the old one:
- the submit button has no id or class and therefore no way to style it independently
- the success message (and others) are outputted in bold. If I wanted them in bold, wouldn’t I have made them bold via the options page?
Besides that, I love it!
Oh, and the quicktag shows up even if I have the box unchecked.
- Added an ID to the submit button (contactsubmit)
- Sucess message is hardcoded bold. Maybe an option in later versions. It was meant to be noticable. Its on lines 106 and 108.
- Quicktags option works again
- Fixed version in wp-contactform.php
1.4.1 coming up!
A new version of buttonsnap can better account for when other plugins are using buttonsnap.
When using the
buttonsnap_dirname()function, pass the filename of your plugin (buttonsnap_dirname(__FILE__)) to ensure that the returned URI is that of your plugin’s directory, not that of the buttonsnap singleton.Thanks. Added the new file, changed the function and bumped the version. Current is 1.4.2. The link above should be correct.
Don’t know if this is relevant or not… I just discovered your plugin, but am using WP 1.5.2, so I grabbed version 1.3 of your Contact form plugin.
I noticed that the html it put out wasn’t validating at the W3C, so I tracked down the problem.
In your code, you have this:
and then for the text area of the message, your plugin is returning
The problem is that the label of “message” doesn’t match the id of “wpcf_message” in your textarea.
Changing the label to this:
will now get the page to validate in the W3C.
Forgive me if you’ve already fixed this problem in the new version you’ve prepared for WP 2.0. You might still want to go back and release a 1.3.1 that contains this little fix, since people will likely keep using WP 1.5 for a while.
And one final question… How much of a performance hit does it take for your plugin to do a regular expression to replace “” with the form?
I ask because I only want to have one contact form on the whole site (I’m not going to use it within posts), but from what I see, it looks like the plugin is performing a search for the quicktag in every post and page on the site, no?
Thanks.
Oh gosh… Sorry, the html in my comment got stripped instead of being parsed safely.
Just to simply: you have the FOR attribute of the LABEL tag is “message”
The ID attribute of the TEXTAREA is “wpcf_message”.
This is causing the form to not validate. Again, this is in version 1.3 of your plugin.
Sorry for the mistake in formatting and posting twice.
Ocellated: The HTML has been fixed in the new version. As far as the search goes, it just looks for that and dies, not much of a performance issue. Before it would generate the form then search for the text and replace it, now it checks first.
Hi Ryan
It works fine – was there ever any doubt?!
Thanks
Rich
The project page has been updated with the new release. I also back ported all changes to 1.3.1 for all people still using WordPress 1.5.x for a while.
Awesome, thanks guys.
Pingback: Ã Minha Maneira - vitor azevedo.com
Wouldn’t it be 2.0? It breaks all 1.x.x before it… just wondering
hi,
is there anyway to add variables to the contact form so I know what post or page it’s coming from? What I want to do is post about events, and include a contact form so people can register for the events. When I get the emails I need to know what event they were looking at when they filled in the form. Thanks,
Karl
Any plans to add attachments?
hi
is there a way to add a antispam stuff – like some numbers people have to type in-
i latly get a lot of spam mails –
thanks
johannes
The comment system works fine but it is an open door to spammers, I get more spam from the contact form than actual legit contacts, more spam than my blog itself. Is there a way to shut this down?
TIA
I have same expreince with johannes and steve.
Adding a secure image like captcha would be a nice add on future release.
Thank you
I have same expreince with johannes and steve.
Adding On-Page a secure image like captcha would be a nice add on future release.
Thank you
hello! concerning the spam topic it should be easy to implement the following (it’s not my idea and maybe does not filter them all, but a huge number):
- define a new variable
for example.
- give the variable a permanent string (‘summer of 69′)
- create a new input field in the form, where the user has to enter this string
- the user gets the information from an image shown above the input field, where the string is visible
- compare the string from the input with the variable in the contactform.php
- only send if equal
I earlier used a thing like this and it drastically pushed down the spam mails. Now I tried to implement it into the form but I am not php-educated enough to fix the small language problems. Unfortunately I deleted even the work I’ve done. The work maybe would be faster.
I and I think many other would be very happy.
Maybe you can the user let the variable input into the options page and then creating a image by him- or herself and implementing it into the contactform.php. Or let the user upload an image inside the options page.
Please do not understand this wrong. I am totally happy to HAVE your contactform right now.
Bye. Mika.
Pingback: Murkelgraphics » Blog Archive » Plugin-Liste dieses Blogs
Thanks for such a great little plugin. This works beautifully. Thank you
This plugin works flawlessly. You have no idea how much time you’ve saved by making this plugin. Hope to see more great plugins from you. Keep up the good work!
Thanks
Hello, I would want to know if it is possible to render the breaking in of the email from part of who not obligatory writes.
I too am getting lots of spam via the form. A simple way to add an image/text verification would be GREAT! Even if it’s something simple like “What is 2+2?” and it would only send if the user enters 4. Then we could customize it ourselves (or even put in an image).
Thanks!
Brian
http://candyaddict.com/blog/contact/
Maybe it’s the theme I’ve chosen, but do you have any ideas why the form would be so out of place when viewed in IE? http://hop-talk.com/contact/
I tried this with wp 2.0.4 and does not seem to do anything, does not validate and does not send, just repost itself and doesn’t look like it’s attempting to send.
Pingback: Lista de los plugins que uso at Daidaros
I wonder if there’s a way to add the contact form on a page without the code? I have a need to call the contact form on a page template, outside of the actual content of the page. I’ve looked through the files, but can’t figure it out.
Any assistance on this would be GREATLY appreciated.
Thanks
Hey Ryan,
Thanks for the script. We are new to WordPres so we are loving all the features everyone has already built to make our lives so much easier!
On our site the lines are not lining up correctly on the form. If you look at it here you will see how the text for the boxes is higher than it should be. How can we correct this? http://www.venzandsons.com/blogs/?page_id=13/
Also, are there plug ins to display the comments or do they just display automatically?
Thanks for the help!
Hey Ryan,
Now that I look at it, I really like how your comments display, how are you doing the different color box deal with your responses and the URI box, do you have a tutorial on how to replicate what you hve going on here man?
Thanks again!
can i call the function using syntax ?
pls advice, i do need it because am creating a static page.
regards