Title: Forms: 3rdparty Phone Numbers
Author: zaus
Published: <strong>2015 年 12 月 30 日</strong>
Last modified: 2016 年 9 月 29 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/forms-3rdparty-phone-numbers.svg)

# Forms: 3rdparty Phone Numbers

 作者：[zaus](https://profiles.wordpress.org/zaus/)

[下载](https://downloads.wordpress.org/plugin/forms-3rdparty-phone-numbers.zip)

 * [详情](https://cn.wordpress.org/plugins/forms-3rdparty-phone-numbers/#description)
 * [评价](https://cn.wordpress.org/plugins/forms-3rdparty-phone-numbers/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/forms-3rdparty-phone-numbers/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/forms-3rdparty-phone-numbers/#developers)

 [支持](https://wordpress.org/support/plugin/forms-3rdparty-phone-numbers/)

## 描述

An add-on to [‘Forms: 3rdparty Integration’](https://wordpress.org/plugins/forms-3rdparty-integration/),
it parses phone number fields from Contact Form submissions and exposes them to 
additional mapping.

Uses the [PHP Port of Google’s libphonenumber](https://github.com/giggsey/libphonenumber-for-php),
which may be included via Composer instead — see [GitHub version](https://github.com/zaus/f3i-phonenumber)
instead.

## 安装

 1. Unzip/upload plugin folder to your plugins directory (`/wp-content/plugins/`)
 2. Make sure [Forms 3rdparty Integration](https://wordpress.org/plugins/forms-3rdparty-integration/)
    is installed and settings have been saved at least once.
 3. Activate this plugin
 4. Set the ‘Phone number fields’ option (fieldset may be collapsed by default) using
    URL-querystring format.

You can provide one or more phone numbers separated by `&` symbols. You may specify
the input format (per country) with `=country-code`. You may specify both the input
format and output format with `=input-format,output-format`. You may use another
submission field to define the format by prefixing that field name with `##`, e.
g. `field_name=##another_field`

Will parse and split up input phone number(s) and create additional ‘submission’
fields (which you can map against): * `FIELDNAME-CountryCode` = country code * `
FIELDNAME-NationalNumber` = regional number (without country code) * `FIELDNAME-
AreaCode` = regional code * `FIELDNAME-Subscriber` = local number (without area 
code) * `FIELDNAME-Extension` = telephone extension, if present * `FIELDNAME-NumberOfLeadingZeros`
= how many zeros it would start with if it had them * `FIELDNAME-Out` = reformated
phone number

Example: to convert input phone-number “9195551234” in various fields:

    ```
    field_name&field2=US,2&field3=2,3&field4=##field5 
    ```

 * `field_name` from assumed format into standard international `+1 919-555-1234`
 * `field2` assuming US country code into standard regional `(919) 555-1234`
 * `field3` from international format (requires country code `+X`) into url style`
   tel:+1-919-555-1234`
 * `field4` from international format (requires country code `+X`) into a format
   defined by `field5`

## 常见问题

  It doesn’t work right…

Drop an issue at https://github.com/zaus/f3i-phonenumber

  Using field labels

Forms 3rdparty Integration makes some form plugin fields available by label as well
as by id. There is a [quirk in parsing url-querystrings](http://php.net/manual/en/function.parse-str.php#76978)
whereby spaces in keys are turned into underscores. As of v0.4.2 this plugin will
check if the key should have had spaces, so that ‘your label=fieldvalue’ will turn
into: * `your label-NationalNumber`
 * `your label-_etc_`

  Formats

From [here](https://github.com/giggsey/libphonenumber-for-php/blob/master/src/libphonenumber/PhoneNumberFormat.php),
among other places

 * _US_ = United States
 * _CH_ = Switzerland
 * _other iso country codes_
 * _1_ = (default) international format
 * _2_ = national format
 * _3_ = RFC3966 (url-format)

## 评价

此插件暂无评价。

## 贡献者及开发者

「Forms: 3rdparty Phone Numbers」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ zaus ](https://profiles.wordpress.org/zaus/)

[帮助将「Forms: 3rdparty Phone Numbers」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/forms-3rdparty-phone-numbers)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/forms-3rdparty-phone-numbers/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/forms-3rdparty-phone-numbers/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/forms-3rdparty-phone-numbers/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/forms-3rdparty-phone-numbers/)。

## 更新日志

#### 0.4.3

 * bump giggsey/libphonenumber to v7.6.1 to fix missing autoloader file

#### 0.4.2

 * addressing [spaces in url key quirk](http://php.net/manual/en/function.parse-str.php#76978)

#### 0.4

 * updated libphonenumber from v7.2.2 to v7.4.5
 * including area code + subscriber number components

#### 0.3

 * use another submission field as the format

#### 0.2

 * support for input/output format

#### 0.1

 * started

## 额外信息

 *  版本 **0.4.3**
 *  最后更新：**10 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.0 或更高版本 **
 *  已测试的最高版本为 **4.5.33**
 *  语言
 * [English (US)](https://wordpress.org/plugins/forms-3rdparty-phone-numbers/)
 * 标签
 * [api](https://cn.wordpress.org/plugins/tags/api/)[contact form](https://cn.wordpress.org/plugins/tags/contact-form/)
   [parsing](https://cn.wordpress.org/plugins/tags/parsing/)[phone number](https://cn.wordpress.org/plugins/tags/phone-number/)
 *  [高级视图](https://cn.wordpress.org/plugins/forms-3rdparty-phone-numbers/advanced/)

## 评级

尚未提交反馈。

[您的评价](https://wordpress.org/support/plugin/forms-3rdparty-phone-numbers/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/forms-3rdparty-phone-numbers/reviews/)

## 贡献者

 *   [ zaus ](https://profiles.wordpress.org/zaus/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/forms-3rdparty-phone-numbers/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://drzaus.com/donate)