Phone

International phone number field powered by intl-tel-input.

International phone number fieldtype for ProcessWire, powered by intl-tel-input v28 (bundled — no CDN dependency).

FieldtypeTel

Author: Maxim Semenov
Website: smnv.org
Email: maxim@smnv.org

If this project helps your work, consider supporting future development: GitHub Sponsors or smnv.org/sponsor.

Features


  • Country picker with flag icons and search
  • Stores four formats per number:
    • E.164 (+12025550123) — for tel: links and API use
    • International (+1 202-555-0123) — for international display
    • National ((202) 555-0123) — for local display (default)
    • ISO2 country code (us) — for filtering and selectors
  • Fully themed to AdminThemeUikit — light and dark mode via --pw-* CSS variables
  • Module-level config: restrict countries, preferred countries, default country, separate dial code
  • Field-level config in the Details tab: all settings per-field

Requirements


  • ProcessWire 3.0.200+
  • PHP 8.2+
  • AdminThemeUikit

Installation


  1. Copy the FieldtypeTel folder into /site/modules/
  2. Go to Modules → Refresh, then install FieldtypeTel
  3. InputfieldTel installs automatically

Module Configuration


Go to Modules → Configure → FieldtypeTel:

SettingDescription
Allowed CountriesRestrict the dropdown to specific countries (empty = all)
Preferred CountriesShown at the top of the dropdown with a divider
Default CountryPre-selected when the field is empty
Show dial code separatelyDisplay the dial code next to the flag, outside the input

Field Configuration


All field settings are in the Details tab when editing a field:

SettingDefaultDescription
Default Country— inheritOverrides the module default for this field
Allow country dropdownDisable for fixed-country fields
National modeEnter numbers without the country prefix
Separate dial code— inheritOverride module setting per-field
Show dial code in inputShow dial code inside the input: +1 (202) 555-0123
Format number as user typesAuto-format with spaces and brackets while typing
Auto Placeholderpolitepolite / aggressive / off

Usage in Templates


$phone = $page->phone; // TelValue object

// Default output — national format
echo $phone;                    // (202) 555-0123

// All formats
echo $phone->national;          // (202) 555-0123
echo $phone->intl;              // +1 202-555-0123
echo $phone->e164;              // +12025550123
echo $phone->country;           // us
echo $phone->dialCode;          // 1

// tel: link
echo "<a href="https://raw.githubusercontent.com/mxmsmnv/FieldtypeTel/main/tel:{$phone->e164}'>{$phone}</a>";

// Empty check
if (!$phone->isEmpty()) { ... }

Page Selectors


// Find pages with an Australian phone number
$pages->find("phone.country=au");

// Find by E.164 prefix
$pages->find("phone*=+61");

Changelog


See CHANGELOG.md.

License


MIT

Author


Maxim Semenov — smnv.orgmaxim@smnv.org
GitHub: @mxmsmnv

More modules by Maxim Semenov

  • Context

    Export ProcessWire site context for AI development (JSON + TOON formats)
  • WireWall

    Advanced traffic firewall with VPN/Proxy/Tor detection, rate limiting, and JS challenge
  • Ichiban (SEO control center)

    Comprehensive SEO module: meta/OG/schema, audit, redirects, revisions, email reports.
  • Subscribe

    Newsletter subscription handler with lists, double opt-in, honeypot, rate limiting and unsubscribe link.
  • Dimensions

    Stores product dimensions (L×W×H) and weight with selectable units of measurement.
  • AiWire

    AI integration for ProcessWire. Supports Anthropic, OpenAI, Google, xAI, and OpenRouter.
  • Plausible Analytics

    Plausible Analytics dashboard using Stats API v2 with page-edit widget, traffic trends chart, and geo/device tabs.
  • PagePDF

    Convert ProcessWire pages to PDF documents with advanced typography support
  • Page Markdown

    Export any page to a clean Markdown file. Adds an export button to the page editor.

All modules by Maxim Semenov

Install and use modules at your own risk. Always have a site and database backup before installing new modules.