Input Blade Component Suffix Action
How do i add a suffix action to my input blade component?
My goal is to have a suffix action that copies whatever text is in the input field.
Solution:Jump to solution
yeah, apparently i could do it like this:
i don't know why i made my life so difficulat. anyway, just have to include the implements and use
```...
9 Replies
i actually already saw the documentation but now that you pointed me to it again.
is it actually the combination of a suffix icon and an icon button blade component from https://filamentphp.com/docs/3.x/support/blade-components/icon-button?
i was looking for a specific suffix action kind of wrapper but i'll try combining a suffix icon and icon button
I imagine there is a reason beyond my understanding...but wouldn't it be easier just to add a form into the livewire component, and then you can use all the regular field methods?
i'm actually not sure if i could just do that but what i'm doing is i have a ViewField::make() that displays sort of an action banner.
in that action banner, there's a button that's supposed to bring up a modal. I couldn't find any way to use filament components the usual way so i'm doing this right now.
if i may ask, is there actually a way to use filament components the "usual way"?
ummm....I'm not an expert on views, blades and livewire...but, you are using a form, with a ViewField, then within the view that is pointed at, presumably you could have a livewire component, and within that you could have a separate form....
But, whether it would require all sorts of configuration because of multiple submits etc...not sure.
i'm looking into it right now.
do i just call livewire like this?
Solution
yeah, apparently i could do it like this:
i don't know why i made my life so difficulat. anyway, just have to include the implements and use
edit:
i have a viewfield and in that viewfield, i'm displaying another livewire component with more filament forms calling the method form(). trying to display the livewire component as is will wreck your app.
you have to define a form with a different name and give it a different state path like in here: https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component
it does break the sidepanel but i think that's for another thread