OneTimeCodeInput fields can submit on their own

OneTimeCodeInput fields can submit on their own

  • form
  • one time code
  • submit on completion

OneTimeCodeInput now has a new submitOnCompletion() option. When it's on, the form submits as soon as the last digit is filled in, whether it was typed, pasted, or autofilled. It's off by default, and Filament's built-in app and email MFA challenge screens now use it. It won't submit the same code twice.

Say you text a 6-digit code on a "confirm your phone" step. User taps the SMS autofill suggestion and goes straight through, without pressing Enter.

OneTimeCodeInput::make('code')
    ->submitOnCompletion()

It also takes a bool or a closure, for example:

->submitOnCompletion(fn () =>
    ! $this->requiresTermsCheckbox).
All Filament Up To Date tips