© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
_andypeacock

A hint, not a question

Hi, just thought I'd share this hear as it took me a while to find the answer. If you need to populate a filament field from outside the alpine/livewire code (ie, in vanilla JS), do the following:

const targetField = document.getElementById('data.<field ID>');
targetField.value = event.data.html;
targetField.dispatchEvent(new Event('input'));
const targetField = document.getElementById('data.<field ID>');
targetField.value = event.data.html;
targetField.dispatchEvent(new Event('input'));


It's the event that's key, as that seems to update the actual alpine model, which then gets saved to the DB
Solution
Solution above
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Dynamic hint not updating
FilamentFFilament / ❓┊help
3y ago
Forms hint opens a modal
FilamentFFilament / ❓┊help
2y ago
Concept question how to create a decision questionair
FilamentFFilament / ❓┊help
3y ago
Hint action disappear.
FilamentFFilament / ❓┊help
2y ago