© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
27 replies
JJSanders

Value of field ins null

In my OrderItem I have this:

   Filament\Forms\Components\TextInput::make('user')
                ->label('Ordered By')
                ->disabled(),
   Filament\Forms\Components\TextInput::make('user')
                ->label('Ordered By')
                ->disabled(),


The model OrderItem has this field:
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }

In the database the user_id field has a value.
However the above TextInput return null. How can I print the name of the related user?
When I do
user.name
user.name
I get
null
null
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

Set value of key-value field
FilamentFFilament / ❓┊help
3y ago
Beginner form question - Field value is 'null'
FilamentFFilament / ❓┊help
2y ago
DatePicker value if DB field is null
FilamentFFilament / ❓┊help
3y ago
Update Content of Key-Value Field
FilamentFFilament / ❓┊help
2y ago