© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
soand

Form section that saves to a json column

Hi! I'm trying to make a form with a section that has different details based on a type, kind of a form within a form. Is there any way to wrap fields within it to make it available as a json object I can save to a column?

My example is different integrations, so an integration record has a name and logo, and then a type like "facebook" or "google ads". When choosing a type I set a set of fields for that platform as the credentials is different.

I'm not going to query on the credentials at any point so it seems better to just save it in a json column rather than having unique table for each type and using relations.

Is there any way in filament to wrap a Section or Grid or something so all fields within the section to be saved as json instead of just adding the fields to the $data array?
Solution
Is there any way in filament to wrap a Section or Grid or something so all fields within the section to be saved as json instead of just adding the fields to the $data array?

This should be possible with
statePath()
statePath()
:
    Group::make([
        // fields here
    ])->statePath('my_json_column'),
    Group::make([
        // fields here
    ])->statePath('my_json_column'),
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

Converting form column to JSON?
FilamentFFilament / ❓┊help
3y ago
form as a table? store to a json column?
FilamentFFilament / ❓┊help
3y ago
Adding an Action to a Form Section?
FilamentFFilament / ❓┊help
3y ago
add actions to form section
FilamentFFilament / ❓┊help
3y ago