<p>You can refer to this <a href="https://craftcms.stackexchange.com/questions/11969/how-can-i-copy-an-entry">How can I copy an entry?</a></p>

<p>Just change:</p>

<pre><code>$newEntry-&gt;enabled = $oldEntry-&gt;enabled;
</code></pre>

<p>to</p>

<pre><code>$newEntry-&gt;enabled = false;
</code></pre>

<p>To start out building your own plugin: <a href="https://pluginfactory.io/" rel="nofollow noreferrer">https://pluginfactory.io/</a>, be sure to select the Services lightswitch.</p>

CC BY-SA 3.0
2017-04-23T15:25:40.940Z
2017-04-23T15:25:40.940Z
Brad
<p>I need a function to duplicate an (published) entry as a draft entry. Now if I duplicate an entry it will immediately publics that entry an that fires some plugin events (sends mails) I didn't want.</p>

CC BY-SA 3.0
2017-04-21T17:32:20.633Z
I'm not sure I'm following 100%, but it sounds like you want to duplicate an entry and have it set to disabled by default?
Brad Bell
CC BY-SA 3.0
2017-04-25T10:32:19.487Z
Sorry for my bad English I meant a draft entry not a concept entry (that's how we call it in Holland). The client publish a entry and after that he want to duplicate that published entry but as a draft and not immediately publish it because the client want to make some changes first and then publish the duplicated entry. After publishing a plugin sends a mail to all users. Therefore it should not be published immediately.
Maarten Heideman
CC BY-SA 3.0
2017-04-26T17:48:08.367Z
No worries, Maarten... it'd definitely need to be done through a plugin and [Brad](https://craftcms.stackexchange.com/a/20149/57) answer is a good starting point.
Brad Bell
CC BY-SA 4.0
2020-05-19T14:39:31.640Z
Is there any better/simpler solution to achieve this ?
Sebastien H.
<plugin-development><entry>
Is it possible to duplicate a entry as a draft entry?
# Is it possible to duplicate a entry as a draft entry?

(Asked by: username_0 on 2017-04-21)

I need a function to duplicate an (published) entry as a draft entry. Now if I duplicate an entry it will immediately publics that entry an that fires some plugin events (sends mails) I didn't want.

**Tags:** plugin-development, entry
> **Comments:**
> **username_1**: I'm not sure I'm following 100%, but it sounds like you want to duplicate an entry and have it set to disabled by default?  
> **username_0**: Sorry for my bad English I meant a draft entry not a concept entry (that's how we call it in Holland). The client publish a entry and after that he want to duplicate that published entry but as a draft and not immediately publish it because the client want to make some changes first and then publish the duplicated entry. After publishing a plugin sends a mail to all users. Therefore it should not be published immediately.  
> **username_1**: No worries, Maarten... it'd definitely need to be done through a plugin and [Brad](https://craftcms.stackexchange.com/a/20149/57) answer is a good starting point.  
> **username_2**: Is there any better/simpler solution to achieve this ?  

---

## 1 answers

### Answer by username_3 on 2017-04-23. Score: 1

You can refer to this How can I copy an entry?
Just change:
$newEntry->enabled = $oldEntry->enabled;

to
$newEntry->enabled = false;

To start out building your own plugin: https://pluginfactory.io/, be sure to select the Services lightswitch.


---

