© 2026 Hedgehog Software, LLC

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

Setting a field value from an action

This is my action:
Actions\Action::make('gespreksverslag_herschrijven')
->label('Gespreksverslag herschrijven')
->icon('heroicon-o-pencil')
->action(function(){


$originalText = $this->data['conversation_report_original'];
$service = new RewriteTextWithGPTService();
$rewrittenText = $service->handle(static::$prompt, $originalText);

$this->form->fill([
'conversation_report_gpt' => $rewrittenText,
], true);

}),

Im trying to fill the field 'conversation_report_gpt' but it's not filling anything.
I also tried other things such as $this->data['conversation_report_gpt'] = $something and $set() but none of them works for me.

This action resides in a Create page of resource
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

get a field value in an action
FilamentFFilament / ❓┊help
2y ago
Get value of field within an action
FilamentFFilament / ❓┊help
3y ago
Action refresh Select field value
FilamentFFilament / ❓┊help
3y ago
Setting an input value from outside the repeater?
FilamentFFilament / ❓┊help
2y ago