<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Contact Form 7 &#187; Tips</title>
	<atom:link href="http://contactform7.com/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://contactform7.com</link>
	<description>Just another contact form plugin for WordPress. Simple but flexible.</description>
	<lastBuildDate>Sun, 22 Aug 2010 07:25:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Redirecting to Another URL After Submissions</title>
		<link>http://contactform7.com/2010/03/27/redirecting-to-another-url-after-submissions/</link>
		<comments>http://contactform7.com/2010/03/27/redirecting-to-another-url-after-submissions/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 19:54:55 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=924</guid>
		<description><![CDATA[First of all, I believe that this tip I&#8217;m writing on this post is not necessary for 99.99% of users and, actually, I don&#8217;t recommend using it. I&#8217;m writing this for the 0.01% of you, so you can ignore it if not necessary.
As you know, Contact Form 7 redirects to the same URL as the [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, I believe that this tip I&#8217;m writing on this post is not necessary for 99.99% of users and, actually, I don&#8217;t recommend using it. I&#8217;m writing this for the 0.01% of you, so you can ignore it if not necessary.</p>
<p>As you know, Contact Form 7 redirects to the same URL as the form&#8217;s URL after form submissions in the default settings. However, in very rare cases, you might need to change this to make it redirect to another URL after submissions. I&#8217;ll write in this post how you can set up Contact Form 7 to do just that.<br />
<span id="more-924"></span></p>
<div style="float: right; margin: 0.2em 0 0.2em 1em;">
<script type="text/javascript"><!--
google_ad_client = "pub-8337552384731792";
/* 300x250 Content */
google_ad_slot = "9733835478";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>By the way, I&#8217;m often asked by users that how they can redirect to so-called &#8220;Thank You Page&#8221;. In most cases, they want to know it because they assume that redirecting to &#8220;Thank You Page&#8221; is necessary for tracking form submissions with Google Analytics. That&#8217;s not necessary at all. In fact, it&#8217;s an outdated and nonsense custom. <strong><a href="http://contactform7.com/2009/11/24/tracking-form-submissions-with-google-analytics/">Today you can track submissions with Google Analytics without any redirection.</a></strong></p>
<p>So you have other reason for redirecting to another URL? Okay. I&#8217;ll show you the procedure.</p>
<p>The simplest way is using <code>on_sent_ok</code> JavaScript action hook. By using this hook, you can specify a JavaScript code that you wish to run after the form is successfully submitted. You will find the Additional Settings field at the bottom of the contact form management page. Simply insert the following line into it:</p>
<pre><code>on_sent_ok: "location = 'http://example.com/';"</code></pre>
<p>Obviously, you need to replace the <em>http://example.com/</em> to the URL you want to redirect to.</p>
<p><img src="https://cacoo.com/diagrams/eUNBrrj8sH4t56Cs-D5500.png" alt="on_sent_ok example" /></p>
<p>That&#8217;s it. So simple, isn&#8217;t it? Try it and check if it works.</p>
<p>If it doesn&#8217;t work, check if <a href="http://contactform7.com/2009/11/24/why-isnt-my-ajax-contact-form-working-correctly/">Ajax is correctly working on your site</a>. It is a JavaScript hook, so it needs JavaScript to work. You&#8217;ll need another hack if you need to redirect on non-JavaScript environments.</p>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2010/03/27/redirecting-to-another-url-after-submissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controlling Behavior by Setting Constants</title>
		<link>http://contactform7.com/2010/02/26/controlling-behavior-by-setting-constants/</link>
		<comments>http://contactform7.com/2010/02/26/controlling-behavior-by-setting-constants/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 01:33:00 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=786</guid>
		<description><![CDATA[Contact Form 7 allows you to control its behavior by setting some constant values.
The typical place to define constants is in the wp-config.php file. You will find that many lines defining constants such as, define('XXX', 'xxx'); exist in the file. You can append new lines after them. Note that your lines must be placed before [...]]]></description>
			<content:encoded><![CDATA[<p>Contact Form 7 allows you to control its behavior by setting some constant values.</p>
<p>The typical place to define constants is in the <em>wp-config.php</em> file. You will find that many lines defining constants such as, <code>define('XXX', 'xxx');</code> exist in the file. You can append new lines after them. Note that your lines must be placed before the last line.<br />
<span id="more-786"></span></p>
<p>Example (<em>wp-config.php</em>):</p>
<pre><code>
define ('WPLANG', '');

<strong>define ('WPCF7_LOAD_JS', false);</strong> // Added to disable JS loading
<strong>define ('WPCF7_LOAD_CSS', false);</strong> // Added to disable CSS loading

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
	define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
</code></pre>
<p>The rest of this post describes a variety of constants.</p>
<table>
<tbody>
<tr>
<th>Constant</th>
<th>Description</th>
</tr>
<tr>
<td><code><a href="http://contactform7.com/2009/11/22/loading-javascript-and-stylesheet-only-when-it-is-necessary/">WPCF7_LOAD_JS</a></code></td>
<td>When the value of this constant is false (default: true), Contact Form 7 does not load the JavaScript on the front end. When the value of this constant is set as &#8216;header&#8217;, Contact Form 7 loads the JavaScript in the header instead of in the footer (default).</td>
</tr>
<tr>
<td><code><a href="http://contactform7.com/2009/11/22/loading-javascript-and-stylesheet-only-when-it-is-necessary/">WPCF7_LOAD_CSS</a></code></td>
<td>When the value of this constant is false (default: true), Contact Form 7 does not load the CSS stylesheet on the front end.</td>
</tr>
<tr>
<td><code>WPCF7_AUTOP</code></td>
<td>When the value of this constant is false (default: true), Contact Form 7 does not apply the &#8216;autop&#8217; filter to the form content. The &#8216;autop&#8217; filter replaces double line-breaks with paragraph elements.</td>
</tr>
<tr>
<td><code>WPCF7_USE_PIPE</code></td>
<td>When the value of this constant is false (default: true), Contact Form 7 disables its &#8216;pipe&#8217; feature, so that pipe character has no special meaning.</td>
</tr>
<tr>
<td><code>WPCF7_SHOW_DONATION_LINK</code></td>
<td>When the value of this constant is false (default: true), Contact Form 7 doesn&#8217;t show the donation link on its admin panel. If you or your client does not wish to view donation information, set this value false.</td>
</tr>
<tr>
<td><code><a href="http://contactform7.com/2009/11/18/restricting-access-to-the-administration-panel-2/">WPCF7_ADMIN_READ_CAPABILITY</a></code></td>
<td>The value of this constant holds the minimum capability required for access to the administration panel. The default value is &#8216;edit_posts&#8217;.</td>
</tr>
<tr>
<td><code><a href="http://contactform7.com/2009/11/18/restricting-access-to-the-administration-panel-2/">WPCF7_ADMIN_READ_WRITE_CAPABILITY</a></code></td>
<td>The value of this constant holds the minimum capability required for editing contact forms. The default value is &#8216;publish_pages&#8217;. Obviously <code>WPCF7_ADMIN_READ_WRITE_CAPABILITY</code> should be stricter than <code>WPCF7_ADMIN_READ_CAPABILITY</code>, as you cannot edit contact forms without accessing the administration panel.</td>
</tr>
<tr>
<td><code>WPCF7_CAPTCHA_TMP_DIR</code></td>
<td>When this constant is defined, the value of the constant overrides the setting of directory path of temporary folder for CAPTCHA files.</td>
</tr>
<tr>
<td><code>WPCF7_CAPTCHA_TMP_URL</code></td>
<td>When this constant is defined, the value of the constant overrides the setting of URL of temporary folder for CAPTCHA files.</td>
</tr>
<tr>
<td><code>WPCF7_UPLOADS_TMP_DIR</code></td>
<td>When this constant is defined, the value of the constant overrides the setting of directory path of the temporary folder for uploaded files.</td>
</tr>
</tbody>
</table>
<p>See also:</p>
<ul>
<li><a href="http://contactform7.com/2009/11/22/loading-javascript-and-stylesheet-only-when-it-is-necessary/">Loading JavaScript and Stylesheet Only When it is Necessary</a></li>
<li><a href="http://contactform7.com/2009/11/18/restricting-access-to-the-administration-panel-2/">Restricting Access to the Administration Panel</a></li>
<li><a href="http://contactform7.com/2009/11/26/selectable-recipient-with-pipes/">Selectable Recipient with Pipes</a></li>
<li><a href="http://contactform7.com/2009/11/25/captcha/">CAPTCHA</a></li>
<li><a href="http://contactform7.com/2009/11/24/file-uploading-and-attachment/">File Uploading and Attachment</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2010/02/26/controlling-behavior-by-setting-constants/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Special Mail Tags</title>
		<link>http://contactform7.com/2009/12/25/special-mail-tags/</link>
		<comments>http://contactform7.com/2009/12/25/special-mail-tags/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 05:36:45 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=670</guid>
		<description><![CDATA[There are times when you may wish to follow more than just the user&#8217;s input through the contact form. For example, you may wish to know the client&#8217;s IP address for security reasons. Contact Form 7 provides some special mail tags for such purposes. You can insert these special mail tags into the Message Body [...]]]></description>
			<content:encoded><![CDATA[<p>There are times when you may wish to follow more than just the user&#8217;s input through the contact form. For example, you may wish to know the client&#8217;s IP address for security reasons. Contact Form 7 provides some special <em>mail tags</em> for such purposes. You can insert these special <em>mail tags</em> into the <em>Message Body</em> field or other fields in the <em>Mail</em> section.<br />
<span id="more-670"></span></p>
<table>
<tbody>
<tr>
<th>Tag</th>
<th>Description</th>
</tr>
<tr>
<td><code>[_remote_ip]</code></td>
<td>This tag will be replaced by the sender&#8217;s client IP address.</td>
</tr>
<tr>
<td><code>[_url]</code></td>
<td>This tag will be replaced by the URL of the contact form.</td>
</tr>
<tr>
<td><code>[_date]</code></td>
<td>This tag will be replaced by the date of the submission.</td>
</tr>
<tr>
<td><code>[_time]</code></td>
<td>This tag will be replaced by the time of the submission.</td>
</tr>
<tr>
<td><code>[_post_id]</code></td>
<td>This tag will be replaced by the ID of the post which contains the contact form.</td>
</tr>
<tr>
<td><code>[_post_name]</code></td>
<td>This tag will be replaced by the name (slug) of the post which contains the contact form.</td>
</tr>
<tr>
<td><code>[_post_title]</code></td>
<td>This tag will be replaced by the title of the post which contains the contact form.</td>
</tr>
<tr>
<td><code>[_post_url]</code></td>
<td>This tag will be replaced by the permalink of the post which contains the contact form.</td>
</tr>
<tr>
<td><code>[_post_author]</code></td>
<td>This tag will be replaced by the author name of the post which contains the contact form.</td>
</tr>
<tr>
<td><code>[_post_author_email]</code></td>
<td>This tag will be replaced by the author email of the post which contains the contact form.</td>
</tr>
</tbody>
</table>
<p>Note that the <code>[_post_*]</code> tag has value only when you put the contact form into content of a post or a page. They are not available if the contact form is put inside a sidebar widget.</p>
<p>The form of those special mail tags has been changed in Contact Form 7 2.2. Old form (<code>[wpcf7.*]</code>) are still supported and able to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2009/12/25/special-mail-tags/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Contact Form in Your Language</title>
		<link>http://contactform7.com/2009/12/25/contact-form-in-your-language/</link>
		<comments>http://contactform7.com/2009/12/25/contact-form-in-your-language/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 04:11:34 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=654</guid>
		<description><![CDATA[Although Contact Form 7 displays contact forms in U.S. English in its default settings, it bundles 40+ language translations and by using them, you can easily create a contact form in any language. Also, you can use Contact Form 7&#8217;s administration panel in your own language.

Using Contact Form 7 in your language
You can translate the [...]]]></description>
			<content:encoded><![CDATA[<p>Although Contact Form 7 displays contact forms in U.S. English in its default settings, it bundles 40+ language translations and by using them, you can easily create a contact form in any language. Also, you can use Contact Form 7&#8217;s administration panel in your own language.<br />
<span id="more-654"></span></p>
<h4>Using Contact Form 7 in your language</h4>
<div style="float: right; margin: 0.2em 0 0.2em 1em;">
<script type="text/javascript"><!--
google_ad_client = "pub-8337552384731792";
/* 300x250 Content */
google_ad_slot = "9733835478";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>You can translate the administration panel of Contact Form 7 into your language by setting the <code>WPLANG</code> constant. You will find a line defining the <code>WPLANG</code> constant in the wp-config.php file and you can edit this line to change the language. For example, to change it to Japanese (&#8216;<code>ja</code>&#8216; is its locale code), define it as shown below:</p>
<pre><code>define ('WPLANG', 'ja');</code></pre>
<p>After this is accomplished, your administration panel will show Japanese descriptions. But please note that this doesn&#8217;t mean the existing contact forms function in Japanese.</p>
<h4 id="Creating_contact_form_in_different_languages">Creating contact form in different languages</h4>
<p>With bundled translations, you can create contact forms in different languages very easily. To obtain a translated contact form, simply click the <em>Add new</em> link, and select the language from drop-down menu.</p>
<p><img src="https://cacoo.com/diagrams/cxWBAb2IDr7Df6Eg-6B07B.png" alt="Selection of language" /></p>
<p>For example, if you are managing a multilingual blog with English and Japanese contact pages, you should create two contact forms &#8212; an English contact form for the English contact page and a Japanese contact form for the Japanese contact page.</p>
<h4>If you have new translation</h4>
<p>If you have created your own language pack, or have an update of an existing one, you can send <a href="http://codex.wordpress.org/Translating_WordPress">gettext PO and MO files</a> to <a href="http://ideasilo.wordpress.com/about/">me</a> so that I can bundle them into Contact Form 7. You can <a href="http://plugins.svn.wordpress.org/contact-form-7/trunk/languages/wpcf7.pot">download the latest POT file from here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2009/12/25/contact-form-in-your-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Cc, Bcc and Other Mail Headers</title>
		<link>http://contactform7.com/2009/11/28/adding-cc-bcc-and-other-mail-headers/</link>
		<comments>http://contactform7.com/2009/11/28/adding-cc-bcc-and-other-mail-headers/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 20:17:12 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=587</guid>
		<description><![CDATA[Contact Form 7 has setting fields for mail headers of To, From and Subject. Have you ever thought of adding Cc or Bcc headers to your mail? Additional Headers fields in the Mail and Mail (2) sections are just for that purpose.

You can input any header lines into the field; and you can insert any [...]]]></description>
			<content:encoded><![CDATA[<p>Contact Form 7 has setting fields for mail headers of <em>To</em>, <em>From</em> and <em>Subject</em>. Have you ever thought of adding <em>Cc</em> or <em>Bcc</em> headers to your mail? <strong><em>Additional Headers</em></strong> fields in the <em>Mail</em> and <em>Mail (2)</em> sections are just for that purpose.<br />
<span id="more-587"></span><br />
You can input <em>any</em> header lines into the field; and you can insert any <a href="http://contactform7.com/2009/11/17/tag-syntax/#mail_tag"><em>mail tags</em></a> into any place in each header line, just like other Mail fields.</p>
<p><img src="https://cacoo.com/diagrams/sXtParjkfxJDWjpR-90401.png" alt="Additional Headers field" /></p>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2009/11/28/adding-cc-bcc-and-other-mail-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selectable Recipient with Pipes</title>
		<link>http://contactform7.com/2009/11/26/selectable-recipient-with-pipes/</link>
		<comments>http://contactform7.com/2009/11/26/selectable-recipient-with-pipes/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 23:48:43 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=550</guid>
		<description><![CDATA[Imagine that you are a webmaster of a company and you need a contact form on your site which will allow the sender to select an email recipient. Let&#8217;s say that the options are the CEO of the company (ceo@example.com), the sales department (sales@example.com) and the support department (support@example.com).

You&#8217;ve been able to achieve this with [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine that you are a webmaster of a company and you need a contact form on your site which will allow the sender to select an email recipient. Let&#8217;s say that the options are the CEO of the company (ceo@example.com), the sales department (sales@example.com) and the support department (support@example.com).<br />
<span id="more-550"></span><br />
You&#8217;ve been able to achieve this with Contact Form 7 in this way: first, make a drop-down menu or radio button for the selection (you can do this by inserting a <a href="http://contactform7.com/2009/11/17/tag-syntax/#form_tag"><em>form tag</em></a> such as:</p>
<pre><code>[select your-recipient "ceo@example.com"
                    "sales@example.com"
                    "support@example.com"]</code></pre>
<p>into the form template); second, enter a corresponding <a href="http://contactform7.com/2009/11/17/tag-syntax/#mail_tag"><em>mail tag</em></a> <code>[your-recipient]</code> into the <em>To:</em> field in the <em>Mail</em> section. This ensures that the email is sent to the specific address that the sender selected.</p>
<div style="float: left; margin: 0.2em 1em 0.2em 0;">
<script type="text/javascript"><!--
google_ad_client = "pub-8337552384731792";
/* 300x250 Content */
google_ad_slot = "9733835478";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>However, there has been a problem with this. By using this procedure, the email addresses are revealed over the Internet and this is not good. These addresses could then become targets of evil spammers very quickly.</p>
<p>So, what you need is a way to allow senders to select from closed data safely. The pipe (&#8216;|&#8217;) support is just for this very purpose.</p>
<p>Change the form tag of drop-down menu to:</p>
<pre><code>[select your-recipient "CEO<strong>|</strong>ceo@example.com"
                    "Sales<strong>|</strong>sales@example.com"
                    "Support<strong>|</strong>support@example.com"]</code></pre>
<p>If you insert a pipe (&#8216;|&#8217;) character in the middle of the option value, only the part before the pipe will be open to the outside, and the part after the pipe will be used for mail replacement.</p>
<p><img src="https://cacoo.com/diagrams/oED82lNSzqKHZTMb-96418.png" alt="pipe sample" class="bordered" /></p>
<p>You can use this usage of pipe only in the drop-down menu values, radio buttons or checkboxes. If you don&#8217;t like this feature, you may define the constant <code>WPCF7_USE_PIPE</code> as <em>false</em> to disable it.</p>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2009/11/26/selectable-recipient-with-pipes/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Locating Response Message Box Anywhere</title>
		<link>http://contactform7.com/2009/11/25/locating-response-message-box-anywhere/</link>
		<comments>http://contactform7.com/2009/11/25/locating-response-message-box-anywhere/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 18:21:35 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=526</guid>
		<description><![CDATA[After a visitor of your blog submits the contact form, the visitor sees a response message from Contact Form 7, such as &#8220;Your message was sent successfully&#8221; or &#8220;Validation errors occurred.&#8221; I sometimes hear from users who tell me that the position of the response message is not good, and, in fact, sometimes their visitors [...]]]></description>
			<content:encoded><![CDATA[<p>After a visitor of your blog submits the contact form, the visitor sees a response message from Contact Form 7, such as &#8220;Your message was sent successfully&#8221; or &#8220;Validation errors occurred.&#8221; I sometimes hear from users who tell me that the position of the response message is not good, and, in fact, sometimes their visitors miss the message entirely.<br />
<span id="more-526"></span></p>
<div style="float: right; margin: 0.2em 0 0.2em 1em;">
<script type="text/javascript"><!--
google_ad_client = "pub-8337552384731792";
/* 300x250 Content */
google_ad_slot = "9733835478";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>The response message is shown at the bottom of the form by default. You can change the location by putting a response message placeholder <strong><code>[response]</code></strong> inside the form. You can insert this <code>[response]</code> tag into any place of your choice. You can use it multiple times in a form. The response message will be shown within the placeholder after submission.</p>
<h4>Demo</h4>
<p>Note: This is a demo. This form doesn’t send a mail practically.</p>
<div style="border: 1px solid #aaa; padding: 20px; margin: 1em;">
[contact-form]
</div>
<p>View source of above form:</p>
<pre><code>[response]

Your Name (required)
[text* your-name]

Subject
[text your-subject]

Your Message
[textarea your-message]

[response]

[submit "Send"]</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2009/11/25/locating-response-message-box-anywhere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking Form Submissions with Google Analytics</title>
		<link>http://contactform7.com/2009/11/24/tracking-form-submissions-with-google-analytics/</link>
		<comments>http://contactform7.com/2009/11/24/tracking-form-submissions-with-google-analytics/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 21:51:52 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=503</guid>
		<description><![CDATA[If you use Google Analytics to analyze web traffic on your site, I imagine you would like to track submissions through your contact forms as well. Contact Form 7 allows you to set up this type of tracking very simply. In this post, I&#8217;ll show you how to do it.

_trackPageview()
If you&#8217;ve set everything up correctly, [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <strong><a href="http://www.google.co.jp/intl/en/analytics/">Google Analytics</a></strong> to analyze web traffic on your site, I imagine you would like to track submissions through your contact forms as well. Contact Form 7 allows you to set up this type of tracking very simply. In this post, I&#8217;ll show you how to do it.<br />
<span id="more-503"></span></p>
<div style="float: right; margin: 0.2em 0 0.2em 1em;">
<script type="text/javascript"><!--
google_ad_client = "pub-8337552384731792";
/* 300x250 Content */
google_ad_slot = "9733835478";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<h4><code>_trackPageview()</code></h4>
<p>If you&#8217;ve <a href="http://contactform7.com/2009/11/24/why-isnt-my-ajax-contact-form-working-correctly/">set everything up correctly</a>, Contact Form 7&#8217;s contact form behaves as an Ajax application and its form submission is an Ajax event. Google Analytics&#8217; <code>_trackPageview()</code> JavaScript function <a href="http://www.google.com/support/googleanalytics/bin/answer.py?hlrm=jp&#038;answer=55519">is able to track an Ajax event</a> without a real page view or redirection.</p>
<p>For example, let&#8217;s say that the name of your page tracker object is <code>pageTracker</code>, and you want to track the form submission as a virtual page view of the virtual URL <em>/mysite/thank-you.html</em>. In order to do this, you will need to run the following JavaScript code when the submission event occurs:</p>
<pre><code>pageTracker._trackPageview('/mysite/thank-you.html');</code></pre>
<p>Note that the <em>/mysite/thank-you.html</em> is not necessary for it to be a real URL. It can be any value, which will then be displayed as a page filename in your Analytics reports.</p>
<h4>Using <code>on_sent_ok</code> action hook</h4>
<p>You don&#8217;t need to edit any JavaScript files for running the above <code>_trackPageview()</code> function. Contact Form 7 provides a JavaScript action hook named <code>on_sent_ok</code>, and by utilizing this action, you can specify a JavaScript code that you wish to run after the form is successfully submitted.</p>
<p>It is quite a straightforward process for you to specify the aforementioned <code>_trackPageview()</code> with the <code>on_sent_ok</code> hook. You will find the Additional Settings field at the bottom of the contact form management page; now simply insert the following line into it:</p>
<pre><code><strong>on_sent_ok: "</strong>pageTracker._trackPageview('/mysite/thank-you.html');<strong>"</strong></code></pre>
<p>Note that you need to quote the codes properly and the code must be in one line.</p>
<p><img src="https://cacoo.com/diagrams/Pm1tQM3duPtxL1Sk-D5500.png" alt="on_sent_ok in Additional Settings" /></p>
<p>Now, if you have set everything up correctly, when someone makes a submission via your contact form, Google Analytics will track it as an access to <em>/mysite/thank-you.html</em>.</p>
<p>To verify that this is working correctly, you can check your Top Content report 24-48 hours after a submission. At that point, you should be able to see the assigned page name (<em>/mysite/thank-you.html</em>) in your report.</p>
<h4>External resources</h4>
<ul>
<li><a href="http://constant.co.za/2010/07/facebook-conversion-tracking-with-contact-form-7/">Facebook conversion tracking with Contact Form 7</a> &#8212; Explains how to track facebook ads on your WordPress site using Contact Form 7.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2009/11/24/tracking-form-submissions-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Why isn&#8217;t My AJAX Contact Form Working Correctly?</title>
		<link>http://contactform7.com/2009/11/24/why-isnt-my-ajax-contact-form-working-correctly/</link>
		<comments>http://contactform7.com/2009/11/24/why-isnt-my-ajax-contact-form-working-correctly/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 19:07:40 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=494</guid>
		<description><![CDATA[Contact Form 7 supports AJAX submissions. Therefore, a correctly configured contact form in Contact Form 7 works exactly like the following demo-form. Try inputting any text into fields and submitting it.



How was it? Did it work like the contact form on your site? Some of you might be surprised to note the differences between your [...]]]></description>
			<content:encoded><![CDATA[<p>Contact Form 7 supports AJAX submissions. Therefore, a correctly configured contact form in Contact Form 7 works exactly like the following demo-form. Try inputting any text into fields and submitting it.</p>
<div style="border: 1px solid #aaa; padding: 20px; margin: 1em;">
[contact-form]
</div>
<p><span id="more-494"></span></p>
<div style="float: left; margin: 0.2em 1em 0.2em 0;">
<script type="text/javascript"><!--
google_ad_client = "pub-8337552384731792";
/* 300x250 Content */
google_ad_slot = "9733835478";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>How was it? Did it work like the contact form on your site? Some of you might be surprised to note the differences between your form and this demo form, and think, &#8220;My form doesn&#8217;t show such nice pop-up error messages.&#8221; &#8220;My form always reloads the page after submitting, but this form doesn&#8217;t.&#8221;</p>
<p>If your form doesn&#8217;t work like this demo form does, it is probable that Contact Form 7&#8217;s JavaScript is not functioning on your site. I&#8217;ll show you a few possible causes for this.</p>
<ul>
<li>JavaScript file is not loaded
<p>This is the cause that I&#8217;ve been seeing the most recently. This is due to your template, which is missing calling functions for queuing JavaScript. The functions required are <code>wp_head()</code> and <code>wp_footer()</code>, and they are in <em>header.php</em> and <em>footer.php</em>, respectively, in most correct themes.</li>
<li>Conflicts with other JavaScript
<p>Many plugins and themes load their own JavaScript. Some of them may have been created incorrectly and therefore conflict with other plugins. In most cases, you can find JavaScript errors with <a href="http://getfirebug.com/">Firebug</a>, an add-on for Firefox, when such conflicts occur.</li>
<li>HTML structure is not valid
<p>Like other JavaScript, Contact Form 7&#8217;s JavaScript traverses and manipulates the structure of HTML. Therefore, if the original HTML structure is not valid, it will fail to work. You can check whether your HTML is valid or not with an HTML validator. I recommend <a href="http://xhtml-css.com/">XHTML-CSS Validator</a> for use in such a case.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2009/11/24/why-isnt-my-ajax-contact-form-working-correctly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Loading JavaScript and Stylesheet Only When it is Necessary</title>
		<link>http://contactform7.com/2009/11/22/loading-javascript-and-stylesheet-only-when-it-is-necessary/</link>
		<comments>http://contactform7.com/2009/11/22/loading-javascript-and-stylesheet-only-when-it-is-necessary/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 20:31:27 +0000</pubDate>
		<dc:creator>Takayuki Miyoshi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://contactform7.com/?p=466</guid>
		<description><![CDATA[In its default settings, Contact Form 7 loads its JavaScript and CSS stylesheet on every page. You might think it would be redundant or wasteful, and want to load them only on those pages that contain contact forms. I understand the feeling, but there is a technical difficulty for a plugin in knowing whether the [...]]]></description>
			<content:encoded><![CDATA[<p>In its default settings, Contact Form 7 loads its JavaScript and CSS stylesheet on every page. You might think it would be redundant or wasteful, and want to load them only on those pages that contain contact forms. I understand the feeling, but there is a technical difficulty for a plugin in knowing whether the page contains contact forms or not at the start of loading. However, I can show you a way to work around that.<br />
<span id="more-466"></span></p>
<h4>Step 1: Stop loading the JavaScript and CSS stylesheet on all pages</h4>
<p>When the value of <code>WPCF7_LOAD_JS</code> is set to <em>false</em> (default: <em>true</em>), Contact Form 7 does not load the JavaScript. You can <a href="http://contactform7.com/2010/02/26/controlling-behavior-by-setting-constants/">set the value of this constant in your <em>wp-config.php</em></a> like this:</p>
<pre><code>define ('WPCF7_LOAD_JS', false);</code></pre>
<p>Likewise, you can control the loading of the CSS stylesheet with <code>WPCF7_LOAD_CSS</code>. Contact Form 7 does not load the CSS stylesheet when the value of <code>WPCF7_LOAD_CSS</code> is <em>false</em> (default: <em>true</em>). You can <a href="http://contactform7.com/2010/02/26/controlling-behavior-by-setting-constants/">set it in the <em>wp-config.php</em></a> like this:</p>
<pre><code>define('WPCF7_LOAD_CSS', false);</code></pre>
<p>Now you have succeeded in stopping the loading of the JavaScript and CSS stylesheet, but, unfortunately, you&#8217;ve also killed them on pages that contain contact forms &#8212; so we really need to get them back on the right pages. So, the next step is what you&#8217;ll need to load the files on to the explicit pages in which you need them.</p>
<div style="float: right; margin: 0.2em 0 0.2em 1em;">
<script type="text/javascript"><!--
google_ad_client = "pub-8337552384731792";
/* 300x250 Content */
google_ad_slot = "9733835478";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<h4>Step 2: Load the files on pages which contain contact forms</h4>
<p>For example, let&#8217;s say you have a page named &#8220;Contact&#8221; and it is the only page that contains a contact form. And suppose that you have a template file for the &#8220;Contact&#8221; page named &#8216;contact.php&#8217; in your theme folder. Now you will need to load Contact Form 7&#8217;s JavaScript and CSS stylesheet specifically on the &#8220;Contact&#8221; page.</p>
<p>To do this, you must edit the &#8216;contact.php&#8217; template file and insert the following lines into it:</p>
<pre><code>&lt;?php
	if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
		wpcf7_enqueue_scripts();
		wpcf7_enqueue_styles();
	}
?&gt;</code></pre>
<p>Note that <code>wpcf7_enqueue_scripts()</code> and <code>wpcf7_enqueue_styles()</code> must be called before <code>wp_head()</code> is called.</p>
]]></content:encoded>
			<wfw:commentRss>http://contactform7.com/2009/11/22/loading-javascript-and-stylesheet-only-when-it-is-necessary/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
