Open webmasterMeyers opened 4 years ago
pass options to the number input when using PhoneNumberType::WIDGET_COUNTRY_CHOICE use like,
PhoneNumberType::WIDGET_COUNTRY_CHOICE
$builder->add('primaryContactPhone', PhoneNumberType::class, [ 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => $this->countryRepository->getCodes(), 'preferred_country_choices' => [$options['countryCodes']], 'number_options' => [ 'attr' => [ 'class' => 'js-phone-autocomplete', 'data-autocomplete-url' => $this->router->generate('grid_api_contact_phone_get_matching'), 'placeholder' => $this->phoneNumberUtil->getExampleNumber($options['countryCodes'])->getNationalNumber(), ], ], ])
pass options to the number input when using
PhoneNumberType::WIDGET_COUNTRY_CHOICE
use like,