Closed DesLynx closed 11 months ago
Hello @DesLynx , thank you very much for this contribution! It looks interesting. However please share with us why, how, and also some screen of how it looks. (any details will help us decide if yes or no we are going to use it).
It also adds a new extension as the requirement... I think mbstring is probably installed everywhere by default, but we should consider this anyway.
Hi! Why: it provides a better look and feel. With no extra CSS nor Javascript. How: it uses emojis.
Note: I removed the requirement for the mbstring extension as giggsey/libphonenumber-for-php
already requires the symfony/polyfill-mbstring
.
Here is a screenshot (in Firefox) for this config:
$form = $this->createFormBuilder($obj)
->add('phone', PhoneNumberType::class, [
'label' => 'Phone number',
'required' => true,
'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE,
'country_choices' => [],
'preferred_country_choices' => ['FR', 'CH', 'BE', 'LU'],
'country_display_emoji_flag' => true,
])
->getForm();
@DesLynx thanks for the details, however, we need to add the symfony/polyfill-mbstring
as well in this case.
Thanks @DesLynx !
Hi! I noticed that you haven't created a new tag for the repo since merging the PR. As it adds the info about the new option country_display_emoji_flag
in the README this can be confusing for the users...
Provides a solution for https://github.com/odolbeau/phone-number-bundle/issues/105