Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’2y agoβ€’
1 reply
Calden

Concat two form fields with multiple select relationship

Hey !

In a resource file, i have this

public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Select::make('teams')
                    ->multiple()
                    ->relationship('teams', 'name')
                    ->preload()
                    ->required(),
                Forms\Components\TextInput::make('group')
                    ->maxLength(255),
                Forms\Components\TextInput::make('name'),
public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Select::make('teams')
                    ->multiple()
                    ->relationship('teams', 'name')
                    ->preload()
                    ->required(),
                Forms\Components\TextInput::make('group')
                    ->maxLength(255),
                Forms\Components\TextInput::make('name'),


in the name field, i'd like to concat all selected names of team selected in the multiselect teams field and concat this with the group textinput field

I dont understand how to get teams names with afterStateUpdated, i only get ids of teams.

Any help ? πŸ™‚
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

Relationship between two dependent select fields
FilamentFFilament / β“β”Šhelp
3y ago
Problem with two select fields using same relationship
FilamentFFilament / β“β”Šhelp
3y ago
Form Select relationship search in two columns
FilamentFFilament / β“β”Šhelp
2y ago
Multiple Select with BelongsToMany relationship
FilamentFFilament / β“β”Šhelp
3y ago