WordPressに関する情報や技術紹介です

Move about the page after sending in Contact Form7

Before the equivalent of " Contact Form7 easy-to-use and wrote, "has been used as a heavy user still.
I sense there is trouble it is too early too little ... the update frequency.

Unfortunately there is little in it, was to examine the forum, my eyes went to completely different content.

About Contact Form7 redirection

redirected in the contact form 7

The content is such that, I think that after sending that want to go to another page in short.

About Contact Form7 redirection

Added: 2010-02-11
You can easily set up and it is version 2.0.1 or later of Contact Form7!
In "other settings",

  "'URL destination' window.location.href =;": on_sent_ok 

If you save and put, you can skip to the specified URL after submission.

↓ you would enter.

Well, I will become more and more convenient. Is grateful.

Previous versions, but it can be resolved by way of under, there is a time to re-set for each version changes, not recommended.

You have put as a previous article.

About Contact Form7 redirection

I was thinking it was a little trouble with this I also want to move to that page after submission! "Thank you for sending" in fact.
To put it a little more concrete, there was a need when you create the site, without the need for conversion settings, etc. If you google Analytics will not go to the "page" transmission completion.

About Contact Form7 redirection

How the forum linked above is being woven doing some advanced, the way I was resolved as follows.
(Roughly 90 per line) to the following locations by opening the "/ contact-form-7/contact-form-7.js".

if (1 == data.mailSent) {
		// メール完了ページのURLを追加
		window.location.href = "http://www.is-p.cc/send-end";
		jQuery(data.into).find('form').resetForm().clearForm();
		wpcf7ResponseOutput.addClass('wpcf7-mail-sent-ok');
		return;
	} else {
		wpcf7ResponseOutput.addClass('wpcf7-mail-sent-ng');
	}

これで一応送信完了後に別のページへ飛ぶことが出来ます。
恐らく「if(1 == data.mailSent)」が「メールが無事に送られた場合」という意味だと思うので、その中にjavascriptでページ移動すれば宜しいのでは、と思います。

Contact Form7 のリダイレクトについて

ただし移動するページは1箇所ですから例えば「お問い合わせ」と「ご注文」でも同じページに飛びます。
まぁ、そこに目をつぶれば一応リダイレクトされます。私は今のところ、これで解決しています。

タグ
, , ,
トラックバックURL

Leave a Reply

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

ページTOPに戻る