© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
11 replies
heat23.

Beginner form question - Field value is 'null'

Here is my form code:
   public function form(Form $form): Form
    {
        return $form
            ->schema([
                TextInput::make('subject')->maxLength(255)->required(),
                Textarea::make('message')->minLength(10)->maxLength(50000),
            ])
            ->statePath('data');
    }

    public function create(): void
    {
        dd($this->form->getState());
    }
   public function form(Form $form): Form
    {
        return $form
            ->schema([
                TextInput::make('subject')->maxLength(255)->required(),
                Textarea::make('message')->minLength(10)->maxLength(50000),
            ])
            ->statePath('data');
    }

    public function create(): void
    {
        dd($this->form->getState());
    }


When I input values in both fields and hit Submit, the dd() output is correct for 'subject' but shows 'null' for the 'message' field. Any ideas on why this is happening?
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

DatePicker value if DB field is null
FilamentFFilament / ❓┊help
3y ago
Value of field ins null
FilamentFFilament / ❓┊help
2y ago
Remove value when form field is hidden
FilamentFFilament / ❓┊help
3y ago
Form field value set but saved as "null" in database
FilamentFFilament / ❓┊help
3y ago