You would expect that the default method would here, but I tried it myself and indeed it's not working!
The only solution I have for you are creating an issue on the nova repository to get this sorted out.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've defined a nova Action that is supposed to send an email to a client with his account data. The idea is to attach a Trix or Textarea field to the action with a default content email template and if possible with the account details already populated within the email content. This way the user will be able to customize the email before sending it.
I've tried just adding text to the field using the default() method but it doesn't seems to take effect
/**
* Get the fields available on the action.
*
* @return array
*/
public function fields()
{
return [
Textarea::make('Email content')->default('Simple text')
];
}
It is not possible to use the default() method in Action Fields as in Form Fields?
And my second question would be, is there any way of passing data to the field to dynamically fill the Action field? In this method is not possible to use laravel's automatic dependency injection.
Please or to participate in this conversation.