© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
kalesha

text input with relation

when i try to access pricing relation with product model, i could not access values in the form text input. can some one help me how to get relation model value with text input ???

TextInput::make('pricing.sell_price')
->label('Price')
->required()
->numeric()
->helperText('Enter price of the product')
->default(fn ($record) => $record?->pricing?->base_price),

product model

public function pricing(): HasOne
{
return $this->hasOne(ProductPricing::class);
}
Solution
You need to use a Layout field with
->relationship()
->relationship()
for this
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

text input relationShip
FilamentFFilament / ❓┊help
3y ago
Text Input Column Update hasMany relation column
FilamentFFilament / ❓┊help
2y ago
text input
FilamentFFilament / ❓┊help
2y ago
text input
FilamentFFilament / ❓┊help
3y ago