Custom form action help
Hi,
Is there a way modify form data when submitting from a custom form action?
I've added this into my createPost.php
This button works correctly in creating a Post record, but I'd like to be modify the 'active' parameter that's in the form data and set it to TRUE before creating the record. Is such a thing possible?
Is there a way modify form data when submitting from a custom form action?
I've added this into my createPost.php
protected function getFormActions(): array
{
return [
$this->getCreateFormAction(),
$this->getCreateAndSetActiveFormAction(),
$this->getCancelFormAction(),
];
} protected function getCreateAndSetActiveFormAction(): Action
{
return Action::make('createandsetactive')
->label('Create and set active')
->submit('createandsetactive');
}This button works correctly in creating a Post record, but I'd like to be modify the 'active' parameter that's in the form data and set it to TRUE before creating the record. Is such a thing possible?