Hi @zhounewz, this is now possible using the beforeDuplicate
admin hook.
Here is an example of how this would look in your case:
const Posts: CollectionConfig = {
slug: 'posts',
admin: {
hooks: {
beforeDuplicate: ({ data }) => {
return {
...data,
_status: 'draft',
};
},
},
},
versions: {
drafts: true,
},
fields: [
// ...
],
};
Cheers!
Star
Discord
online
Get dedicated engineering support directly from the Payload team.