Categories
WordPress Plugins

Contact Form 7 FAQ

This post is no longer updated. Move to Contact Form 7 official site.


Download | Plugin Homepage | FAQ | Support Forum

(日本語の FAQ はこちら)

  1. Where is the settings page for Contact Form 7?
  2. How can I add a contact form into my post content?
  3. How can I add a field to my contact form?
  4. Nothing shows up in the email, even after adding a tag to the form! How can I include a new field’s input in the email?
  5. I get emails containing codes such as [foobar]. What’s this? I want to see the user’s input.
  6. How can I specify a subject for the email?
  7. Can I place a contact form outside a post?
  8. Can I embed a contact form into my template file?
  9. After submitting the form, I get an error message stating “Failed to send your message”. What is wrong?
  10. I get an error message with a red border. So, how can I solve this?
  11. I see a response message “Your message was sent successfully” with green border, but I never receive a mail for that.
  12. The spinning arrow icon shows up once I submit a form, but then nothing happens.
  13. My contact form behaves oddly on certain browsers.
  14. I want to use contact form in my language, not in English. How can I do that?
  15. CAPTCHA does not work; the image does not show up.
  16. CAPTCHA’s text input box is working on Internet Explorer, but not with Firefox. I cannot enter the code.
  17. File upload & file attachment do not work.


Where is the settings page for Contact Form 7?

Log into WordPress and open Settings > Contact Form 7.

Update: It’s in Manage > Contact Form 7 since Contact Form 7 1.8.

Update: WordPress 2.7 moved the page to Tools > Contact Form 7.

How can I add a contact form into my post content?

Open the settings page for Contact Form 7, and then open the contact form you want to add.

Each contact form has its own tag, such as [contact-form 1 "My contact form"]. To insert the contact form into your post, copy the tag and paste it into the post content.

faqimg1.png

How can I add a field to my contact form?

To add a field, add a tag to the Form textarea.

faqimg2.png

Each tag has a strict syntax, supporting several options (see Contact Form 7 Tag Syntax).

Learning the syntax might be difficult, but you can easily make a custom tag by using the tag generator instead. Click Generate Tag and simply select the options you’re interested in.

Nothing shows up in the email, even after adding a tag to the form! How can I include a new field’s input in the email?

You need to add a new tag to the Mail fields. This tag should correspond to the tag in the Form you wish to include in the email. Thus, when you add a new form tag such as [text your-new-field], the corresponding email tag would be [your-new-field]. Only the second part of the tag (“your-new-field”, in this case) is needed for the email.

faqimg3.png

A tag in the Mail field will be replaced with the user’s input contained in a form field with the same name.

I get emails containing codes such as [foobar]. What’s this? I want to see the user’s input.

See above. In this case, no form tag corresponds to the [foobar] email tag. A tag in the Mail field which has no corresponding tag in the Form will be left without replacement.

How can I specify a subject for the email?

Simply edit the Subject field in the Mail section (not in the Form section).

Can I place a contact form outside a post?

Yes. You may place a contact form in a text widget as well.

Can I embed a contact form into my template file?

No, this functionality is not yet supported.

After submitting the form, I get an error message stating “Failed to send your message”. What is wrong?

There could be two causes for this. The first is actual mail server trouble, where email cannot be sent. In this case, the error message would be surrounded with a RED border line. Contact your server admin.

The second possible cause is that the form content is classified as spam by Akismet. In this case, the error message would be surrounded with a YELLOW border line.

I get an error message with a red border. So, how can I solve this?

There are really various reasons for server side problems, so I can’t explain exactly what yours is. But experiences of other users who solved their problem might be helpful for you.

Mario Vargas says he solved a mail-related problem with WP-Mail-SMTP plugin.

I see a response message “Your message was sent successfully” with green border, but I never receive a mail for that.

Showing the green border message means that the PHP function for sending the mail has certainly completed successfully. So if you can’t receive the mail, it’s highly possible that the mail has been kidnapped or killed after that.

If you can check the log of your mail server, it could give you some clues. Spam filter often causes this kind of problem.

The spinning arrow icon shows up once I submit a form, but then nothing happens.

This is most probably due to a conflict between plugins. Try deactivating all other plugins.

My contact form behaves oddly on certain browsers.

This may be caused due to invalid HTML, CSS, or Javascript. Please check your form page with a validator or debugging tool.

Useful tools:
Firebug — Firefox extension. Good for Javascript debugging.
XHTML-CSS Validator — A validator with a good UI.

I want to use contact form in my language, not in English. How can I do that?

Contact Form 7 has been translated into many languages. See if the languages folder contains a language file for your language.

The locale setting of Contact Form 7 follows the locale setting of WordPress. Once you change the WordPress locale to, Contact Form 7 is also changed. See how to change the WordPress locale here.

CAPTCHA does not work; the image does not show up.

To use CAPTCHA, you need GD and FreeType library installed on your server. Also, the contact-form-7/captcha/tmp folder must be writable.

Contact Form 7 1.8 and later require wp-contents/uploads/wpcf7_captcha folder writable, instead of contact-form-7/captcha/tmp.

Update (2009/03/23): Contact Form 1.9.4 and later refers your upload folder setting in Settings > Miscellaneous menu for resolving the base directory for CAPTCHA’s temporary folder. So it may not use wp-contents/uploads/wpcf7_captcha. For example, when your upload folder is set “wp-content/myfiles”, CAPTCHA temp files will be created in wp-content/myfiles/wpcf7_captcha, so you need to make that folder writable.

CAPTCHA’s text input box is working on Internet Explorer, but not with Firefox. I cannot enter the code.

This is a well-known issue caused by misusing the <label> element. Make sure you are using it correctly.

This is good:

[captchac your-captcha]
<label>Enter the code: [captchar your-captcha]</label>

This will not work correctly:

<label>[captchac your-captcha]
Enter the code: [captchar your-captcha]</label>

File upload & file attachment do not work.

See this post.

File uploading and attachment with Contact Form 7

440 replies on “Contact Form 7 FAQ”

hello mijoshi, i got an error which tell that

Fatal error: Call to undefined function imagettftext() in /wp-content/plugins/contact-form-7/captcha/captcha.php on line 61

thanks

Hi
Time ago, I read in a comment in this site a user expressing the wish to have the fields of the form written in a csv file in a way to keep trace and use it.
It will be nice if this kind of function could be integrated in this very usefull plugin.

Thanx

I need to hide Contact Form 7 in the Tools bar for everyone except Admin. Can you tell me how to do that?

(I’d also like to just hide Tools all together for everyone except Admin.)

@popart you can get it by this. Open wp-contact-form-7.php and look at line 63 – 69, replace it with this:

if (! function_exists('wpcf7_read_capability')) {
function wpcf7_read_capability() { return 'manage_options'; }
}

if (! function_exists('wpcf7_read_write_capability')) {
function wpcf7_read_write_capability() { return 'manage_options'; }
}

Ok i don’t see the features “reload captcha”, “CC: or BCC:” or support for Paypal or other gateways, does these features will be added in the future?

I’m curious, thats why i make these questions.

This is a great plugin. Keep up the good work ;)

oh yes! I forgot to ask this question also, this plugin will have SSL support?

Sorry if i ask too many questions, this plugin is great as is, but i would like to see it greater.

Thank you for your time. ;)

@ftv3000 CC or BCC, okay it’s in my to-do list now. Reload CAPTCHA sounds redundant for me. How about Paypal in detail? How do you want to use it in contact form?

@ftv3000 and other users who need SSL support, please give me information about the scene where you intend to use contact form with SSL in detail. How do you activate SSL with WordPress? Do you need SSL whole site or only around the form page? Maybe I can make it, so give me some hints.

Thank you for your answer, before anything.

-In forms, you can do so many things, so for the pay pal support, if you want to sell something, it would be nice to include the options for pay pal. I’m not saying to put a hole store, just something simple.

-In the matter of SSL support, there is a plugin called admin SSL it is very good, but there is no support for the forms, so yes the idea is just for the contact form, because for the hole site it just would be too heavy to process, and there are web hosting providers like mine, that limit these things.

-And just another idea, could be possible to include a way to link this form to the reCaptcha plugin, instead of the normal captcha?

Thank you for your attention and for your patience.
These are just ideas ;)

How to hide form controls when the data are successful ly sent? I need only the “message was sent successfully” line after successful submit.
Thank you!

First of all big props for such a cool plugin, I have a dumb question… I have edited the background color and such of:

div.wpcf7 input {
div.wpcf7 textarea {

… how do I now customize just the “Send” button?

Thanks

En, what kind of setting do you mean? Basically this is just a contact form plugin for WordPress, so doesn’t have ability of managing any servers.

As for hiding form when the mail was sent OK: I did it changing code in wp-contact-form-7.php, lines 892-923. The message line is moved before the form as well.

Great plugin! I am using the form on my site and because of spacing issues want to shorten the height of the message area. This is because the status boxes get hidden on my site because the page is too long.

Hi,

I am trying to figure out how I can style the form that users see, so that the background on the input fields stand out a bit more, for instance if they have a grey background instead of white. But I haven’t managed to figure out where in the .css I would accomplish that.

Hey,

I’ve installed the form – works great (mostly).

For some reason the email comes through but doesnt contain the senders name or email address so I dont have the info to reply to them. Any ideas?

Heres the code for the form.

Your Name (required)
[text* text-383]

Your Email (required)
[text text-297]

Subject
[text your-subject]

Your Message
[textarea your-message]

[captchac captcha-332 size:m] – please type this code into box below for security

[captchar captcha-332]

[submit “Send”]

Thank you.

Tom

Is it possible to put the post title in the e-mail subject line to identify which post the contact is referring to? One option is obviously to create a field for “which post are you contacting us about,” but it would be great if there’s a way to have it automatically put into the e-mail subject line.

Thanks in advance,

Ryan

Great Plugin, thanks! As ftv3000 mentioned, Paypal support would amazing for users who just want to sell a few items or setup donations. Just something simple where you could choose items and the form would show you the total. Then on submit it could still send you the email but also take the user to paypal to finish the transaction.

Hi,

Can someone explain to me how to move “thanks for sending your comment” info before the form? Ideally it would be cool to send the submitter to a new “thank you” page. Can anyone help?

Thanks

Hello!

Wonderful plugin! Great work, it really adds to my WP site!

One thing that might be nice: the possibility to have several e-mail recipients but by tags and even better, by using single tag, radio buttons or checkboxes. Example:

Instead of having one form for contacting site admin and one identical form for contacting let’s say “the team”, I could have one single form where I can choose recipient (check boxes for and/or, and radio buttons for exclusive or). Addresses are still hidden and maintained by WP-admin. So if user wants info sent to admin, tick “admin” recipient, if user wants info sent to “the team” tick “the team”.

I’m using Contact Form 7 with WP 2.7 & qTranslate.
Qtranslate enables multilanguage pages/posts, in a way users have to write the same page/post in multiple languages.
I use Contact Form template for form generation, but language doesn’t switch accordingly.

Is there a way to do so or do I need to build a template per each language?

For some reason it will send to my GMail account but not to my Google Apps business account. I have my domain pointing to my web hosting server and MX records pointed to Google Apps but I won’t receive it when I put in my business account but it will work when pointed to GMail. Not sure what is going on?

Do you know if this is compatible with WPMU 2.6.5? I’m getting a Fatal Error when I try to go to the options screen. Here’s there error:
PHP Fatal error: Cannot use string offset as an array in …/wp-contact-form-7.php line 454

Any pointers welcome! Thanks!

Hello! I am having problems with the form.. I installed it correctly, I have askimet.. But I keep getting the “red-outlined” error message.. I didnt tamper with anything yet, just entered my e-mail address. Please help :(

I have a art contest going on and I am using contact form 7 which I think is brilliant. However the email that gets filled out doesn’t send me any info that was filled out?

Am I not tagging the info correctly? They also have the ability to upload a file where do these go?

Thanks for your help in advance and thank you for the code.

aw

Hi!

My Question is:
How can I create a multiple choice of e-mail adresses in contact form 7.
for example i want to have a choice to send a text to webmaster or to the boss or to someone else….

please help me and send me a mail to biertraeger[at]gmx.de

Hi mate,

Great plugin – thanks a lot. One thing though; is there any way to stop ‘#wpcf7-f2-w1-o1’ being fired into the header once I’ve used the submit button on the form? Only, it’s messing about with some of my other JS page features for some reason?

Reply ASAP would be awesome as I’m working on this for a client and the project is already overdue.

Cheers bro,
L

SOLVED ^

$url = $url[‘path’] . (empty($url[‘query’]) ? ” : ‘?’ . $url[‘query’]) . ‘#’ . “contact”; – in the wp-contact-form-7.php in case anyone else has the same trouble.

Cheers blud ;]
L

tried uninstalling and reinstalling an older version (1.9.1) and am still having the same problem.

I get “Your message was sent successfully. Thanks.” but receive no email.

What’s up?

I would like to use drop down menu to enable people to select why they are writing, then to deliver their message to a specific email box for each topic. For example if they select “sales” then it goes to sales@website.com; if they select “marketing” it goes to adman@website.com; if they select “complaint” it goes to trash@website.com etc.

Can you show how to code that such that each drop down topic sends to an admin specified email?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s