FilamentF
Filament13mo ago
pjb

Changing Field Wrapper View for Form Component Throws Exception

What I am trying to do:

I am trying to use the fieldWrapperView() method on a Select form component to change which blade file gets used for the field wrapper.

What I did:

I copied
vendor/filament/forms/resources/views/components/field-wrapper/index.blade.php
to
resources/views/filament/field-wrapper.blade.php

then updated the Select to:

Forms\Components\Select::make('city')
    ->view('filament.address-verify-city-select')
    ->fieldWrapperView('filament.field-wrapper')


I also tried various different directory/sub-directory structures and naming conventions in my resources/views and fieldWrapperView() calls to make it work, to no avail.

I have another blade template in the same directory, which I use in the ->view('filament.address-verify-city-select') call and that works just fine.

My issue / the error:
InvalidArgumentException
Unable to locate a class or view for component [filament.field-wrapper]. 


Appreciate any help! Thanks!
Was this page helpful?