How to push `script` & `css` in custom form field filament?

Im make custom field filament v4 https://filamentphp.com/docs/4.x/forms/custom-fields
@once('scripts')
@endonce

@once('styles')
@endonce

<x-dynamic-component
:component="$getFieldWrapperView()"
:field="$field"
>
<div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }">
<input x-model="state" />
</div>
</x-dynamic-component>
@once('scripts')
@endonce

@once('styles')
@endonce

<x-dynamic-component
:component="$getFieldWrapperView()"
:field="$field"
>
<div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }">
<input x-model="state" />
</div>
</x-dynamic-component>
I want only load once css & js when form using this custom field.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?