maheralmatari
Password confirmation not refreshed
TRY THIS Checkbox::make('password_change_checkbox')
->label('Change your password')
// ->visibleOn('edit')
->live(),
TextInput::make('password')
->password()
->required()
->dehydrateStateUsing(fn ($state) => Hash::make($state))
->same('password_confirmation')
->live(onBlur: true)
->afterStateUpdated(function ($livewire,TextInput $component) {
$livewire->form->getState();
// $livewire->validateOnly($component->getStatePath());
})
//
// ->visibleOn('edit')
->hidden(fn(Get $get): bool => !$get('password_change_checkbox')),
TextInput::make('password_confirmation')
->password()
->required()
->live(onBlur: true)
->afterStateUpdated(function ($livewire, $component) {
$livewire->form->getState();
// $livewire->validateOnly($component->getStatePath());
})
->required()
// ->visibleOn('edit')
->hidden(fn(Get $get): bool => !$get('password_change_checkbox'))
10 replies
Custom Login Page
use
custome page like this and change the view
namespace App\Filament\Pages\Auth;
use Filament\Forms\Form;
use Filament\Pages\Auth\Login as FilamentLogin;
class Login extends FilamentLogin
{
public static string $view = 'auth.login'; //// here use your view
public function form(Form $form): Form
{
return $form
->schema([
]) ->statePath('data') ->model( ); } } @Billi
]) ->statePath('data') ->model( ); } } @Billi
9 replies