Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add option to disable the confirm password input #109

Closed
caendesilva opened this issue Aug 27, 2022 · 2 comments
Closed

Comments

@caendesilva
Copy link
Contributor

caendesilva commented Aug 27, 2022

Hey there! First of all, thanks for making such a great package!

I see that the password confirmation input is hard-coded in the Register.php form schema. There are a lot of criticism regarding a field like this. I think it would be really nice to have the configuration option to disable it. Maybe by using a ->when() method chain?

See uxmovement.com, ux.stackexchange.com, and about 377 000 000 more results on Google.

An additional feature that I think would be amazing that is useful both when there is a confirmation field and not is to have a way to show the password in plain text as is suggested in Sign-in form best practices at web.dev as this is great for both UX and accessibility.
image

Sidenote, on the issues page there are links to create discussions, however, the discussion page is not enabled.

@caendesilva
Copy link
Contributor Author

Update: as a workaround I changed the registration page with an override as follows, in case anyone else wants to do this.

<?php

namespace App\Http\Livewire\Auth;

use Filament\Forms;
use JeffGreco13\FilamentBreezy\FilamentBreezy;

class Register extends \JeffGreco13\FilamentBreezy\Http\Livewire\Auth\Register
{
    protected function getFormSchema(): array
    {
        return [
            Forms\Components\TextInput::make('name')
                ->label(__('filament-breezy::default.fields.name'))
                ->required(),
            Forms\Components\TextInput::make('email')
                ->label(__('filament-breezy::default.fields.email'))
                ->required()
                ->email()
                ->unique(table: config('filament-breezy.user_model')),
            Forms\Components\TextInput::make('password')
                ->label(__('filament-breezy::default.fields.password'))
                ->required()
                ->password()
                ->rules(app(FilamentBreezy::class)->getPasswordRules()),
        ];
    }
}

@jeffgreco13
Copy link
Owner

Closing to prepare for Filament v3. Nice solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants