public function form(Form $form): Form
{
return $this->makeForm()
->schema([
Wizard::make([
Wizard\Step::make('User Registration')
->afterValidation(function () {
if ($someCondition) {
/* Get 2nd step and make hidden(false) */
}
})
->description(__('Register as a Company Admin or as Regular User'))
->schema([
$this->getNameFormComponent(),
$this->getLastNameFormComponent(),
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
$this->getPasswordConfirmationFormComponent(),
]),
Wizard\Step::make('Company Registration')
->description(__('[Optional] For Company Admin'))
->schema([
$this->getTenantFormComponent(),
$this->getDomainFormComponent(),
]),
])->submitAction(new HtmlString(Blade::render(<<<BLADE
<x-filament::button
type="submit"
size="sm"
>
Submit
</x-filament::button>
BLADE))),
])
->statePath('data');
public function form(Form $form): Form
{
return $this->makeForm()
->schema([
Wizard::make([
Wizard\Step::make('User Registration')
->afterValidation(function () {
if ($someCondition) {
/* Get 2nd step and make hidden(false) */
}
})
->description(__('Register as a Company Admin or as Regular User'))
->schema([
$this->getNameFormComponent(),
$this->getLastNameFormComponent(),
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
$this->getPasswordConfirmationFormComponent(),
]),
Wizard\Step::make('Company Registration')
->description(__('[Optional] For Company Admin'))
->schema([
$this->getTenantFormComponent(),
$this->getDomainFormComponent(),
]),
])->submitAction(new HtmlString(Blade::render(<<<BLADE
<x-filament::button
type="submit"
size="sm"
>
Submit
</x-filament::button>
BLADE))),
])
->statePath('data');