Download the PHP package kadegray/statamic-phone-number-fieldtype without Composer

On this page you can find all versions of the php package kadegray/statamic-phone-number-fieldtype. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package statamic-phone-number-fieldtype

Statamic Phone Number Fieldtype

Statamic Phone Number Fieldtype is a Statamic addon that is everything you need to store and display Phone Numbers on your site.

Features

How to Install

You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:

How to Use

Phone Number Fieldtype

Once you include the Phone Number Fieldtype in your blueprint and edit an entry, it will be presented as an International Telephone Input for convenient input and display.

<img src="readme/images/entry_input.png" alt="Phone Number Fieldytype in Entry" />

When you open the country select, it will be displayed in the following manner:

<img src="readme/images/entry_input_countries_select.png" alt="Phone Number Fieldytype with Countries select open" />

When a user inputs "2015550123" into the field, the fieldtype will automatically format it into E164 format as "+12015550123", where "+1" represents the country code. The phone number will be saved in E164 format within the entry.

<img src="readme/images/entry_input_number_entered.png" alt="Phone Number Fieldytype with number entered" />

Upon reloading the page after saving the entry, you will observe that the number is automatically formatted in the national format. This formatting behavior is based on the selected country, allowing for proper handling of both international and national numbers.

<img src="readme/images/entry_input_displayed_in_national_format.png" alt="Phone Number Fieldytype with number entered" />

Fieldtype Configuration

When you edit the Fieldtype, you have the ability to configure the following options:

Modifiers

If you have assigned the field handle as phone_number or australia_phone_number, you can render the original stored value in E164 format using the following code:

+12015550123
+61412345678

However, if you prefer to render the number in the national format, you can utilize the e164_to_national modifier as follows:

(201) 555-0123
0412 345 678

Additionally, if you would like to present the number in a more visually appealing international format, you can utilize the e164_to_international modifier:

+1 201-555-0123
+61 412 345 678


All versions of statamic-phone-number-fieldtype with dependencies

PHP Build Version
Package Version
Requires sokil/php-isocodes Version ^4.1
sokil/php-isocodes-db-i18n Version ^4.0
giggsey/libphonenumber-for-php Version ^8.13
statamic/cms Version ^6.0
symfony/translation Version ^6.4|^7.0|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kadegray/statamic-phone-number-fieldtype contains the following files

Loading the files please wait ...