© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•11mo ago•
2 replies
sohail

Create Custom Form Field (Image Selector)

Form builder
Hi

i am trying to create a custom form field which let so select for a preloaded image and also upload your own image and this is how i want the input to work

ImageSelector::make('thumbnail')
                ->images($this->thumbnails) // array of preload image
ImageSelector::make('thumbnail')
                ->images($this->thumbnails) // array of preload image


i have add so you can see the image from the thumbnail array and pass back but what i can figure out and how the user can upload the image
i tried and what i get back as a temp livewire file but i want the actual upload the image and get it back on the path to the image

plus is there a way i can do some validation after the image have be uploaded because some of the validation i dont want to do over and over again every where i use this
i would like to do those directly in the component

- make sure the selected image is form the array
- make sure the actual uploaded image is a image


<input type="file" wire:model="{{ $getStatePath }}">
<input type="file" wire:model="{{ $getStatePath }}">
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

Image Selector
FilamentFFilament / ❓┊help
2y ago
Custom form field
FilamentFFilament / ❓┊help
2y ago
Custom Form Field
FilamentFFilament / ❓┊help
2y ago
Custom MoneyInput form field
FilamentFFilament / ❓┊help
2y ago