© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
9 replies
Mhmoud Khalaf

Add a custom property to a SpatieMediaLibraryFileUpload based on another text field in Repeater

Repeater::make('gallery')
    ->schema([
        SpatieMediaLibraryFileUpload::make('image')
            ->collection('gallery')
            ->customProperties(['caption' => '...'])
            ->image()
            ->required(),
        TextInput::make('caption')
            ->required(),
    ])
    ->addActionLabel('Add image'),
Repeater::make('gallery')
    ->schema([
        SpatieMediaLibraryFileUpload::make('image')
            ->collection('gallery')
            ->customProperties(['caption' => '...'])
            ->image()
            ->required(),
        TextInput::make('caption')
            ->required(),
    ])
    ->addActionLabel('Add image'),


how to set the caption property based on the text input field?
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

Auto add empty repeater based on a value in another field
FilamentFFilament / ❓┊help
2y ago
Auto-populating a repeater based on another field
FilamentFFilament / ❓┊help
2y ago
text input field update based on another text input
FilamentFFilament / ❓┊help
2y ago
SpatieMediaLibraryFileUpload inside a Repeater
FilamentFFilament / ❓┊help
2y ago