© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
pimousse7928

Nested Fieldset and relationship

Hello there,

I have two nested fieldsets with relationship. At first save, address is not saving, however, at second save (update), address is saving correctly.

I guess it's easy to understand the the first model (company) is not created so it doesn't know to which model the address should be attached.

Did someone already did this?

->schema([
Forms\Components\Fieldset::make('Entreprise')
->relationship('company')
->schema([
Forms\Components\TextInput::make('name')->label('Nom'),
Forms\Components\TextInput::make('identification_number')->label('Numéro SIRET'),
Forms\Components\TextInput::make('sector_reference')->label('Code NAF'),
Forms\Components\TextInput::make('reference')->label('Numéro partenaire'),
Forms\Components\TextInput::make('vat')->label('Numéro de TVA'),
Forms\Components\Fieldset::make('Adresse')
->relationship('address')
->schema([
Forms\Components\TextInput::make('address_line_1')->label('Adresse ligne 1'),
Forms\Components\TextInput::make('address_line_2')->label('Adresse ligne 2'),
Forms\Components\TextInput::make('city')->label('Ville'),
Forms\Components\TextInput::make('postcode')->label('Code postal'),
Forms\Components\TextInput::make('country')->label('Pays'),
]),
])
]);
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

Spatie Translatable Plugin and relationship fieldset
FilamentFFilament / ❓┊help
2y ago
Get Relation Fieldset State / Set Outside State in Relationship Fieldset
FilamentFFilament / ❓┊help
2y ago
Filament 3 Fieldset relationship not storing
FilamentFFilament / ❓┊help
4mo ago
Not Loading Data from Fieldset->relationship()
FilamentFFilament / ❓┊help
2y ago