Replicate - but display form instead of saving directly.
I want to duplicate a model instance and some required fields should be ignored. In this case the standard replicate action fails because the confirm modal only shows a confirm button and by pressing it the duplicated cannot be saved in the database because of the ignored non-nullable columns.
I found this v3 thread but the solution does not work: https://discord.com/channels/883083792112300104/1245204314645987399
After analyzing the core code I found that the solution as simple as adding a
$this->schema()
.
So here is my working custom action class that displays my form inside the replicate modal and allows to fill out the not replicated, required fields:
Maybe this helps other. π0 Replies