How to place form actions on header actions

this is what i've tried, the problem is that when i click save in the header action save btn, it doesnt do anything

<?php

namespace App\Filament\Resources\FormResource\Pages;

use App\Filament\Resources\FormResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;
use Filament\Support\Colors\Color;

class CreateForm extends CreateRecord
{
    protected static string $resource = FormResource::class;

    protected static bool $canCreateAnother = false;

    protected function getHeaderActions(): array
    {
        return [
            Actions\Action::make('cancel')
                ->label(__('filament-panels::resources/pages/create-record.form.actions.cancel.label'))
                ->color('gray')
                ->url(route('filament.admin.resources.forms.index'))
                ->icon('heroicon-o-backspace')
            ,
            $this->getCreateFormAction()->icon('heroicon-m-cloud-arrow-down')->color(Color::Teal),
        ];
    }

    protected function getFormActions(): array
    {
        return [
            $this->getCreateFormAction()->icon('heroicon-m-cloud-arrow-down')->color(Color::Teal), // ⚠️ this should be deleted, as we use it in header actions. but the one in header actions doesnt work, why?
            //
        ];
    }

    protected function getCreateFormAction(): Actions\Action
    {
        return Actions\Action::make('create')
            ->label(__('filament-panels::resources/pages/create-record.form.actions.create.label'))
            ->submit('create')
            ->keyBindings(['mod+s'])
        ;
    }
}
Was this page helpful?