© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
10 replies
dasK_

Converting form column to JSON?

Having some issues with filling a column out called productDetails, it's set up to accept json and I've been doing it fine with straight laravel by means of json_encode to write and json_decode to read

but in Filament, the only thing I'm able to do is write a string to the productDetails column when I edit a product, creating a product it gives me an Array to string conversion exception, I've tried to use the save function to do this (chatGPT may have this wrong because I'm not getting any logs)

Hopefully the code will make more sense, I've also provided an example of what it's meant to look like in the DB.

https://gist.github.com/tommmoe/5a33c7057d5081f985cb74fb08934d9d#file-gistfile1-txt
Gist
json fields
json fields. GitHub Gist: instantly share code, notes, and snippets.
json fields
Solution
That's how it's encoded but when you decode it it should be correct? Are the items part of a repeater? Then. would make them as you want them I believe
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Form section that saves to a json column
FilamentFFilament / ❓┊help
3y ago
form as a table? store to a json column?
FilamentFFilament / ❓┊help
3y ago
Filament json column
FilamentFFilament / ❓┊help
2y ago
Column Span Form Builder
FilamentFFilament / ❓┊help
3y ago