© 2026 Hedgehog Software, LLC

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

CreatModel edit getFormActions based on a condition.

I need to run specific checks on different CreateModel's form actions. All i need to do is return "create" , "save and create another" and cancel depending on the condition. Now getCreateFormAction() is available but i cant seem to find other options for "cancel" and "create"

Is this built in or do i need to create it from scratch?

protected function getFormActions(): array
{
$user = auth()->user()->phone;

if ($user !== null) {
return [
$this->xxxCancel();
];
}
return [
$this->getCreateFormAction(),
$this->xxxCreateAndCreateOther(),
$this->xxxCancel();
];
}
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

reordering based on condition
FilamentFFilament / ❓┊help
3y ago
hide Tabs based on condition
FilamentFFilament / ❓┊help
3y ago
Table list edit query based on certain conditions
FilamentFFilament / ❓┊help
2y ago
Open a blocking modal on login based on a condition.
FilamentFFilament / ❓┊help
2y ago