© 2026 Hedgehog Software, LLC

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

Is it possible to modify state of KeyValue before filling?

I have the following Form element to handle some translations in a key-value component but I need to add some missing keys, e.g.
title
title
is array of ['en' => 'test'] but I would like user to be able to also input
de
de
language. How can I modify a state of the component so I would also include a missing
de
de
key with an empty value.

Forms\Components\KeyValue::make('title')
                        ->disableEditingKeys()
                        ->disableDeletingRows()
                        ->disableAddingRows()
                        ->keyLabel('Language')
                        ->valueLabel('Text')
                        ->required()
Forms\Components\KeyValue::make('title')
                        ->disableEditingKeys()
                        ->disableDeletingRows()
                        ->disableAddingRows()
                        ->keyLabel('Language')
                        ->valueLabel('Text')
                        ->required()
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

Modify collection before filling table
FilamentFFilament / ❓┊help
2y ago
Is it possible to modify the aggregation column query?
FilamentFFilament / ❓┊help
3y ago
KeyValue - possible to mask/validate format for entered values before saving?
FilamentFFilament / ❓┊help
3y ago
Is it possible to empty the table before ImportAction?
FilamentFFilament / ❓┊help
14mo ago