F
Filamentβ€’14mo ago
leeb98

Combine two fields on a form!

Spinning the wheels on this simple one , behind the scenes i have extended the User table to include first and surname, All I'm trying to do is combine the first + surname into .. Currently have the field on an input form ..Yes i can manually type in name and the process work , But need to be smart about this refer below for form definition . any ideas ? BIG THANKS πŸ™‚ Section::make('Person')->schema([ TextInput::make('name')->hidden(), TextInput::make('First') ->required(), TextInput::make('Surname') ->required(), TextInput::make('email') ->required() ->email(), TextInput::make('Password') ->required() ->password(), ])->columns(3)
3 Replies
lazydog
lazydogβ€’14mo ago
$table->string('full_name')->virtualAs('concat(first_name, \' \', last_name)');
$table->string('full_name')->virtualAs('concat(first_name, \' \', last_name)');
leeb98
leeb98OPβ€’14mo ago
Thanks that worked .. πŸ‘
Want results from more Discord servers?
Add your server