F
Filament15mo ago
Scott

Disable "create another" on form (non modal)

I only want to let users create a single item for a model, but in the form it shows "Create and create another". I know you can disable this for a modal Action, but how do you disable it for a regular form?
Solution:
if you are using pages
//CreateXX.php
protected static bool $canCreateAnother = false;
//CreateXX.php
protected static bool $canCreateAnother = false;
...
Jump to solution
5 Replies
Dennis Koch
Dennis Koch15mo ago
There should be a corresponding method/property on the CreateRecords page
Solution
LeandroFerreira
LeandroFerreira15mo ago
if you are using pages
//CreateXX.php
protected static bool $canCreateAnother = false;
//CreateXX.php
protected static bool $canCreateAnother = false;
if you are using modals
Actions\CreateAction::make()
->createAnother(false)
Actions\CreateAction::make()
->createAnother(false)
Dennis Koch
Dennis Koch15mo ago
And there the property magically appears 😅
Scott
ScottOP15mo ago
Nice, thank you!
binaryfire
binaryfire11mo ago
I don't think this is documented? At least, I couldn't find it..

Did you find this page helpful?