UI Blade Component for Toggle Form Field #13648
Unanswered
myregistration
asked this question in
Help
Replies: 1 comment
-
i was searching for this exact problem, looks like i need to create a custom component.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package
Other
Package Version
v3
How can we help you?
For some reason, not all of the Filament form fields have relative UI Blade components. Can someone please explain how to create a Blade component for the Toggle field, as an example?
I know how to use the Filament forms method in a Resource class. I want to use a Blade component like <x-filament::input.toggle /> within a custom Livewire component. This is already possible with the Filament Select input field via <x-filament::input.select />, but there is no Toggle UI blade component.
Here are the current available UI Blade components for form fields:
https://filamentphp.com/docs/3.x/support/blade-components/overview
I tried adding the following the AppServiceProvider:
but got the following error:
[Method Filament\Forms\Components\Toggle::resolve does not exist.](http://localhost/organization/set-preferences?oid=9502ce34-a1f2-4f12-b6a2-553440775a0c#top)
I'm sure there are a lot of gaps in my understanding of the backend thus far as it's pretty complicated.
I also tried extending the Toggle field, but still had same resolve issue.
Also, when you create a custom field it will put it in directory path relative to
filament.forms.components.range-slider
, but it actually usesforms.components.range-slider
Beta Was this translation helpful? Give feedback.
All reactions