ysfkaya / filament-phone-input

A phone input component that uses intl-tel-input for Laravel Filament
https://filamentphp.com/plugins/ysfkaya-phone-input
MIT License
158 stars 31 forks source link

Cannot set default for phone number input #41

Closed haron68 closed 6 months ago

haron68 commented 6 months ago

Hi nice plugin but it doesn't seem like the helper method works for setting a default phone number.

Code

PhoneInput::make('contact_phone')
    ->default('+12223334444')
    ->required()

Current

image

Expected

image
ysfkaya commented 6 months ago

Hi @haron68

I have tested now and it works well. You need to fill the form on mount method of your Livewire component.


public function mount(): void
{
    $this->form->fill();
}
ysfkaya commented 6 months ago

I am closing this issue as there are no more replies. If the issue persists, start a discussion or contact me on discord

sezohessen commented 3 months ago

@ysfkaya how can I save country code? code mean +1 for Us not storing US

sezohessen commented 3 months ago

@ysfkaya In the view or edit page its not showing the flag of the number despite of phone_country is exists