© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
7 replies
Sven

Default Key-Value when creating a new record

While we can set a default value for a normal input field, I can't seem to find the option to do the same for a key-value field.

Is it possible to set a default array value on page load?
Solution
this should be
->default([
    'sizes' => 'S, M, L, XL, XXL'
])
->default([
    'sizes' => 'S, M, L, XL, XXL'
])
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Reordering Records - Add default sort value when new record is created
FilamentFFilament / ❓┊help
2y ago
Use `relationship()` when creating a new record
FilamentFFilament / ❓┊help
3y ago
default key value in key-value pair
FilamentFFilament / ❓┊help
2y ago
Set Default when Creating Record from Relation
FilamentFFilament / ❓┊help
5mo ago