[WordPress] 外掛分享: International Telephone Input for Contact Form 7

首頁外掛目錄 › International Telephone Input for Contact Form 7
WordPress 外掛 International Telephone Input for Contact Form 7 的封面圖片
8,000+
安裝啟用
★★★★
4.6/5 分(26 則評價)
1487 天前
最後更新
問題解決
WordPress 4.0+ PHP 7.0+ v1.5.7 上架:2015-12-23

內容簡介

這是一個 Contact Form 7 的外掛,新增了一個輸入欄位,可以用於輸入和驗證國際電話號碼。此外掛會加入一個帶有電話號碼前綴的旗幟下拉式選單,偵測使用者所在國家,顯示相對應的預設文字、提供格式化和驗證方法。

使用方法

安裝和啟用外掛後,一個新的輸入欄位類型將會出現在 Contact Form 7 表單中。要將其新增到您的表單中,您可以點擊表單編輯器上方的「國際電話」按鈕,或是添加類似這樣的短碼:[intl_tel* {your-phone}],取代 {your-phone} 為您所需的欄位名稱。可選擇性地,您可以使用星號(*)使欄位成為必填欄位。

要在郵件中顯示欄位內容,請使用此標籤:[{your-phone}]。顯示出來的結果將類似 +12025550109。

郵件中的額外資訊

您還可以從電話號碼中恢復特定的部分:所屬國家的名稱、國家代碼、沒有國碼的號碼。使用這些標籤:

[{your-phone}-cf7it-country-name]:印出所屬的國家名稱。例如:美國
[{your-phone}-cf7it-country-code]:印出電話號碼所屬國家的代碼。例如:1
[{your-phone}-cf7it-country-iso2]:印出國家的 ISO 代碼。例如:us
[{your-phone}-cf7it-national]:印出沒有國際區碼的電話號碼。例如:2025550109

第三方軟體

這個外掛使用了 International Telephone Input JavaScript 函式庫和 eXTReMe-IP-LOOKUP.com API。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.5.7) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「International Telephone Input for Contact Form 7」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Addon for Contact Form 7 that creates a new type of input for entering and validating international telephone numbers. It adds a flag dropdown with prefix of the telephone number, detects the user’s country, displays a relevant placeholder and provides formatting/validation methods.
How to use
Once you have installed and activated your plugin, a new type of input field will be available in your Contact Form 7 forms. In order to add it to your form, you can either click on the “International Telephone” button above your form editor, or add the shortcode like: [intl_tel* {your-phone}]. Replace {your-phone} by the name do you want to give the field. Optionally, you can use the asterisk (*) to makes the field required.
To display the field’s info on your email, use this tag: [{your-phone}]. It will display something like +12025550109
Aditional info in your email
You can also recover specific parts of the telephone number: the name of the country it refers to, the country code, the number without the country code. Use this tags:

[{your-phone}-cf7it-country-name]: It prints the name of the country. For the example above: United States
[{your-phone}-cf7it-country-code]: It prints the country code of the phone number. For the example above: 1
[{your-phone}-cf7it-country-iso2]: It prints the country iso code. For the example above: us
[{your-phone}-cf7it-national]: It prints the phone number without international prefix. For the example above: 2025550109

Third-party software
This plugin uses the International Telephone Input JavaScript library and the eXTReMe-IP-LOOKUP.com API.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon