© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Martin

Update a KeyValue field

in V2 I was able to update a KeyValue field like so:

Forms\Components\TextInput::make('test1')
  ->live()
  ->afterStateUpdated(function (Forms\Get $get, Forms\Set $set) {
      $set('test2', [
          'txt' => $get('test1'),
      ]);
  }),

                                Forms\Components\KeyValue::make('test2')
  ->default(['txt' => '']),
Forms\Components\TextInput::make('test1')
  ->live()
  ->afterStateUpdated(function (Forms\Get $get, Forms\Set $set) {
      $set('test2', [
          'txt' => $get('test1'),
      ]);
  }),

                                Forms\Components\KeyValue::make('test2')
  ->default(['txt' => '']),


But that doesn't seem to work anymore... I can't figure out how to update the values :/
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

Select Input in KeyValue Field ?
FilamentFFilament / ❓┊help
2y ago
KeyValue - Form Builder - Fields
FilamentFFilament / ❓┊help
2y ago
KeyValue
FilamentFFilament / ❓┊help
17mo ago
Wrong order after saving a page with a KeyValue field
FilamentFFilament / ❓┊help
3y ago