Using <x-forms::field-wrapper> component in blade
Hello, I wanted to know how to properly use the component in blade views. I have been using the component for making sure that the UI of my custom views look similar to that of Filament. I use the component to wrap a custom input component to achieve a similar look because I currently can't use filament's text input component in blade views. Here is an example:
This actually works for me. And even uses the error message bags from my custom action classes. Keep in mind these action classes are similar to the action classes used in Laravel Jetstream, so Filament is not being used in the actual classes such as Component Classes and Custom action classes that extend the Components.
So my questions are:
1. Are the values passed into the field wrapper such as "statePath" and "required" the correct values? I have them set to statePath="name" and required="true". Should required be set to "name"?
2. Is it wrong to do this, and if so, is there another method that can be used instead?
0 Replies