Git Product home page Git Product logo

craft-phone-number's People

Contributors

brandonkelly avatar jaydensmith avatar rynpsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

craft-phone-number's Issues

JSON Decode error after migrating from plain text field

Hi,

It's getting an invalid argument exception on "yii\helpers\BaseJson::decode('01234 123 123')"

I think what's happened is I've moved from a plain text field with "01234 123 123" set, and now that's not valid JSON so it's getting upset.

getCountryCode() and getRegionCode() are mixed up

According to docs:

{{ entry.phone.getCountryCode() }} - The alphabetical country code
{{ entry.phone.getRegionCode() }} - The numerical region code

Actual (php code):

->getRegionCode() returns the alphabetical country code (ES when using Spanish phone nr.)
->getCountryCode() returns the numerical region code (34 when using Spanish phone nr.)

This also matches the libphonenumber-for-php docs

Feed Me support

I see from some other issues the field requires [region] and [number] child fields so I can see why feedme might not work but are you planning on supporting or do you know any work arounds?

Field doesn't save when creating/publishing new entry

When creating a new entry, and inputting a phone number into a Phone Number field, when you click "publish entry", coming back to the entry edit page shows the Phone Number field is now blank. I have to input it a 2nd time for it to successfully save, it appears as if it'll only truly save the field until after the entry is "published".

PHP version 7.4.2
MySQL 5.7.26
Craft 3.6.10

Thanks :)!

How to save phone number from front end form

I need the ability for front-end users to update their phone number but it's not currently working as I had hoped.
Can I register the PhoneNumberAsset bundle and use the field from the front end, or is there a way to store the default country code as a hidden field so that it will save?
Thanks!

Incorrect href when using `tel` Twig filter

When using the url Twig filter, the site URL gets included in the href value:

{{ varWithPhoneNumber|tel('DE')

โ†’ invalid result:

<a href="http://example.test/tel:+49-123-4567879">+49 (0) 123 / 4567879</a>

expected:

<a href="tel:+49-123-4567879">+49 (0) 123 / 4567879</a>

Search field value?

Not really an issue, but is finding entry by this plugin value is possible?

I've tried something like this

Entry::find()->phone("85000000000")->all();

and even something silly like this

Entry::find()
    ->phone([
        "number" => "85000000000",
        "region" => "US"
    ])
    ->all();

Thanks in advance!

Incorrect Failed Area Code Validation

Hello, thanks for the great plugin! I think I may have found a bug related to area codes.

Currently, it seems that 787 US phone numbers result in a validation error - though this is a valid US area code.

Let me know if you need any additional info.
Screenshot 2024-02-06 at 10 50 21 AM

Craft 4 500 error

Hi there,

I've just installed your plugin but when I choose it as a field type I get a 500 error in the console and this error in the logs:

2022-05-24 16:22:29 [web.ERROR] [Error] Error: Typed property rynpsc\phonenumber\fields\PhoneNumberField::$defaultRegion must not be accessed before initialization in /vendor/craftcms/cms/src/helpers/Template.php:90

Craft CMS 4.0.3
Phone Number 2.0.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.