© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago
headbanger

form field not resetting + update data

public function table(Table $table): Table
    {
        return $table
            ->columns([
                TextColumn::make('question'),
            ])
            ->actions([
                Action::make('Reply')
                    ->form([
                        TextInput::make('replyMessage')
                            ->required()
                            ->live()
                    ])
                    ->modalContent(function (ChatSession $record, Action $action) {
                        return view(
                            'filament.chat-messages.chats',
                            ['chatSession' => $record],
                        );
                    })

                    ->extraModalFooterActions(fn(Action $action): array => [
                        $action->makeModalSubmitAction('Reply', arguments: ['halt' => true]),
                    ])
                    ->action(function ($action, ChatSession $record, array $data, $arguments, Set $set, Get $get) {
                        $chatMessageService = new ChatMessageService();
                        $chatMessageService->create($record->id,$data['replyMessage'],auth()->user()->id,true);
                        
                        if ($arguments['halt'] === true) {
                            $action->halt();
                        }
                    })
                    ->slideOver()
                    ->modalSubmitAction(false)
            ]);
    }
public function table(Table $table): Table
    {
        return $table
            ->columns([
                TextColumn::make('question'),
            ])
            ->actions([
                Action::make('Reply')
                    ->form([
                        TextInput::make('replyMessage')
                            ->required()
                            ->live()
                    ])
                    ->modalContent(function (ChatSession $record, Action $action) {
                        return view(
                            'filament.chat-messages.chats',
                            ['chatSession' => $record],
                        );
                    })

                    ->extraModalFooterActions(fn(Action $action): array => [
                        $action->makeModalSubmitAction('Reply', arguments: ['halt' => true]),
                    ])
                    ->action(function ($action, ChatSession $record, array $data, $arguments, Set $set, Get $get) {
                        $chatMessageService = new ChatMessageService();
                        $chatMessageService->create($record->id,$data['replyMessage'],auth()->user()->id,true);
                        
                        if ($arguments['halt'] === true) {
                            $action->halt();
                        }
                    })
                    ->slideOver()
                    ->modalSubmitAction(false)
            ]);
    }

1. How can I reset the value of replyMessage field? $set , $this->form->fill(); $this->reset('replyMessage') - all 3 are not working when written above halt() and anything written after halt doesnt get executed.
2. This custom view (filament.chat-messages.chats), loads the chat message of a user & admin. I am dispatching an event from livewire from the frontend, how can I listen to that event of a new message so that the messages get updated in this modal?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Livewire form field not included in parent form's data
FilamentFFilament / ❓┊help
9mo ago
Form submit not recognizing data from 'view field'
FilamentFFilament / ❓┊help
3y ago
Update Form FIELD state from JS
FilamentFFilament / ❓┊help
2y ago
Update form field from page action
FilamentFFilament / ❓┊help
3y ago