© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
9 replies
nowak

How to remove createAnother button from createOptionAction modal?

In a Form Select field, when I want to add the abilitiy to create another option on the relationship, it only makes sense in some cases to add one extra option that needs to be selected by the select field. Here I do not want to see the "Create & create another" action in my modal, as this only confuses the end user.

This does not work:
->createOptionAction(function (Action $action) {
    return $action
      ->createAnother(false)
}),
->createOptionAction(function (Action $action) {
    return $action
      ->createAnother(false)
}),

As:
Method Filament\Forms\Components\Actions\Action::createAnother does not exist.
Method Filament\Forms\Components\Actions\Action::createAnother does not exist.

How can we remove this action from the createOptionAction modal?
Solution
Okay, so that cleared it up. in the
getCreateOptionAction()
getCreateOptionAction()
method in the
filament/packages/forms/src/Components/Select.php
filament/packages/forms/src/Components/Select.php
class, an extra modal footer action is added conditionally:
->extraModalFooterActions(fn (Action $action, Select $component): array => $component->isMultiple() ? [
  $action->makeModalSubmitAction('createAnother', arguments: ['another' => true])
    ->label(__('filament-forms::components.select.actions.create_option.modal.actions.create_another.label')),
] : []);
->extraModalFooterActions(fn (Action $action, Select $component): array => $component->isMultiple() ? [
  $action->makeModalSubmitAction('createAnother', arguments: ['another' => true])
    ->label(__('filament-forms::components.select.actions.create_option.modal.actions.create_another.label')),
] : []);

So this is a way to remove it:
->createOptionAction(function (Action $action) {
    return $action
      ->extraModalFooterActions([])
}),
->createOptionAction(function (Action $action) {
    return $action
      ->extraModalFooterActions([])
}),
Jump to solution
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

CreateAnother Button closing modal
FilamentFFilament / ❓┊help
2y ago
remove button from modal
FilamentFFilament / ❓┊help
3y ago
How to remove the default submit button from a modal
FilamentFFilament / ❓┊help
2y ago
How to remove Create button from resource
FilamentFFilament / ❓┊help
3y ago