You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is my PHP class code. public function mount() { $this->data['country_code'] = str_replace("+","",optional(user())->country_code); $this->data['phone_no'] = str_replace(optional(user())->country_code,'',optional(user())->phone_no); $this->data['full_no'] = optional(user())->phone_no; }
Here is my livewire blade component <x-tel-input wire:model="data.phone_no" id="phone" name="phone" class="form-input" /> <input wire:model="data.country_code" type="hidden" id="phone_country" name="phone_country">
The text was updated successfully, but these errors were encountered:
Having a similar issue, when the form is submitted to the livewire component, I'm getting empty for the model.
were you able to resolve this ? @itsnoman
@victorybiz please any idea why this might be happening ?
Here is a snippet
public function save()
{
$this->validate();
var_dump($this->phone); var_dump($this->phone_country);// this is returning empty string
$this->successMessage = 'Thank you for this';
//Clear fields
$this->reset(['number', 'message']);
//return links preview link and shortlink option
}
Here is my PHP class code.
public function mount() { $this->data['country_code'] = str_replace("+","",optional(user())->country_code); $this->data['phone_no'] = str_replace(optional(user())->country_code,'',optional(user())->phone_no); $this->data['full_no'] = optional(user())->phone_no; }
Here is my livewire blade component
<x-tel-input wire:model="data.phone_no" id="phone" name="phone" class="form-input" /> <input wire:model="data.country_code" type="hidden" id="phone_country" name="phone_country">
The text was updated successfully, but these errors were encountered: