Contact Form7で郵便番号を入れたら自動で表示させる方法(Ajax zip3)


Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Deprecated: Function create_function() is deprecated in /home/warai-plus/www/bugpixel.net/wp/wp-includes/pomo/translations.php on line 202

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/warai-plus/www/bugpixel.net/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

ajaxzip3は知っていたので、
サイトに組み込もうと思ったら、

新規の設置には yubinbangoライブラリの使用をオススメしています。

とあったので使ってみました。

yubinbangoってそのままですね。
日本人にしか意味わからない気もしますが、、

日本向けのやつなんでしょうか。

ライブラリの場所

ajaxzip3
yubinbango

使い方

とても簡単でした。
ちょっと最初はつまづきましたが、
classを指定するだけで使えます!

1.まずライブラリを読み込む

2.htmlにclassを適用させる。

そしてショートコードを入れる。

解説します

・formタグのclass指定の中に h-adr を設定

・form中で、国名(p-country-name) が Japan を設定

・郵便番号入力欄のclass指定の中に p-postal-code を設定

例1のほうがユーザーには優しいので例1にしましょう。
(入力欄がわかれていると移動させる手間ができる)

・住所欄のclass指定の中に、
都道府県名(p-region)、市町村区(p-locality)、町域(p-street-address)、以降の住所(p-extended-address) をそれぞれ設定

contactForm7だとこうなる

感想

これはWeb製作者ならほとんど使ってるのではないでしょうか。
作ってくれた方に感謝!!!!!!

ad