FilamentF
Filament3y ago
John

Modify text area content with Alpine

I'd like my text area to automatically add this line in the content:
[Edited on 11-6-2023]
on blur.
(Except when the last line is exactly that already.)

I already have some autosave magic going on in afterStateUpdated, so I'd like to have this functionality client side with Alpine.
Do I need a custom field? Or can I add Alpine to a standard Textarea component?

I see ->extraAlpineAttributes() but I can't find that in the docs.

I tried playing around with a custom field, but I have no idea how to change the value while playing nice with Alpine/Filamen state.
Was this page helpful?