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 Koch2y ago
There should be a corresponding method/property on the CreateRecords page
Solution
LeandroFerreira
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 Koch2y ago
And there the property magically appears 😅
Scott
ScottOP2y ago
Nice, thank you!
binaryfire
binaryfire13mo ago
I don't think this is documented? At least, I couldn't find it..

Did you find this page helpful?