International Telephone Box

Documentation

The [intelebox_input] shortcode

Add a standalone international phone field to any page with [intelebox_input], and set its name, id, placeholder, class and required attributes.

Last updated

View as Markdown

Use the [intelebox_input] shortcode to add a standalone international phone field anywhere on a page or post. It is the same field the plugin adds to every input[type="tel"], and it needs no setup.

Basic example

[intelebox_input name="mobile" id="mobile" placeholder="Enter phone number" class="my-phone-field" required="true"]

Attributes

AttributeDefault
namephone
id—
placeholderEnter phone number
class—
required—
AttributeWhat it does
nameThe name attribute of the , used when the form is submitted. Default phone.
idThe id attribute of the . Empty by default (no id output).
placeholderPlaceholder text shown when the field is empty. Default Enter phone number.
classExtra class name(s) added to the field's container.
requiredOutputs HTML required on the input. true, 1 or yes (case-insensitive); off by default.

What gets submitted

While the visitor types, the field is formatted, and on blur it is normalised to an E.164 number like +201012345678. The plugin also adds a hidden full_phone field that carries the full international number with your form.

Validation still applies

The shortcode field is validated like any other phone field: in the browser while typing, on blur and on submit, and again on the server with libphonenumber when server validation is available (PHP 8.1+). On an Arabic or right-to-left page, the number still reads left to right; see Arabic & RTL sites.

If your form plugin validates the field before our script runs, keep the required attribute and let the plugin handle the rest.