© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•12mo ago•
1 reply
Shay Rosenfeld

Using json properties for form schema

I have a form that uses a model on laravel with a json column. Inside there are some properties. There are tags and difficulty level inside but when saving, it overwrites the whole json instead of just changing the correct property.

A simple example of a json column value (column name is
metadata
metadata
):
{
  "tags": [
    "Beauty & Health",
    "Health Care",
    "Massage & Relaxation",
    "Physiotherapy",
    "Acupressure",
    "Reflexology",
    "Acupressure Socks",
    "Massage Socks",
    "Foot Massager"
  ],
  "difficulty": {
    "level": 42
  },
  ...restProperties
}
{
  "tags": [
    "Beauty & Health",
    "Health Care",
    "Massage & Relaxation",
    "Physiotherapy",
    "Acupressure",
    "Reflexology",
    "Acupressure Socks",
    "Massage Socks",
    "Foot Massager"
  ],
  "difficulty": {
    "level": 42
  },
  ...restProperties
}

The
TagsInput
TagsInput
and the TextInput I use work, and it saves, but then the
metadata
metadata
column is becoming only
tags
tags
and
difficulty
difficulty
.

The form components part of the schema:
TagsInput::make('metadata.tags')
                    ->separator(',')
                    ->splitKeys(['Tab', 'Enter', ',']),

                TextInput::make('metadata.difficulty.level')
                    ->type('number')
                    ->minValue(1)
                    ->maxValue(100),
TagsInput::make('metadata.tags')
                    ->separator(',')
                    ->splitKeys(['Tab', 'Enter', ',']),

                TextInput::make('metadata.difficulty.level')
                    ->type('number')
                    ->minValue(1)
                    ->maxValue(100),

Obviously I am doing something wrong, but I can't find something in the docs relating to that.
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

Using form schema for PDF export
FilamentFFilament / ❓┊help
3y ago
Using protected properties on form actions
FilamentFFilament / ❓┊help
3y ago
using associative array for table/form schema array
FilamentFFilament / ❓┊help
3y ago
Form schema reuse
FilamentFFilament / ❓┊help
6mo ago