© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
Florian Langer

Insert value from one field to another

Hi,

I would like to auto generate the email for my user form from the first and lastname.

I tried this, but it didn't work:
            CreateAction::make()->form([
                Grid::make(2)->schema([
                    TextInput::make('firstname')
                             ->reactive()
                             ->required(),
                    TextInput::make('lastname')
                             ->reactive(),
                             ->required(),
                ]),
                TextInput::make('email')
                         ->suffix('@company.com')
                         ->default(fn($get) => $get('firstname') . '.' . $get('lastname'))
                         ->unique()
                         ->required()
            ]);
            CreateAction::make()->form([
                Grid::make(2)->schema([
                    TextInput::make('firstname')
                             ->reactive()
                             ->required(),
                    TextInput::make('lastname')
                             ->reactive(),
                             ->required(),
                ]),
                TextInput::make('email')
                         ->suffix('@company.com')
                         ->default(fn($get) => $get('firstname') . '.' . $get('lastname'))
                         ->unique()
                         ->required()
            ]);


How can I make this work?

Thank you!
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Value from another field
FilamentFFilament / ❓┊help
3y ago
Insert to one table from another table
FilamentFFilament / ❓┊help
3y ago
Set FileUpload value from another field
FilamentFFilament / ❓┊help
2y ago
How to set value to createOptionForm from another field?
FilamentFFilament / ❓┊help
2y ago