Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-23T15:25:40.940Z
Answers.LastActivityDate: 2017-04-23T15:25:40.940Z
Answers.UserDisplayName: Brad
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-21T17:32:20.633Z
Comments.Text: 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?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-25T10:32:19.487Z
Comments.Text: 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.
Comments.UserDisplayName: Maarten Heideman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-26T17:48:08.367Z
Comments.Text: 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.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-19T14:39:31.640Z
Comments.Text: Is there any better/simpler solution to achieve this ?
Comments.UserDisplayName: Sebastien H.
Tags: <plugin-development><entry>
Title: Is it possible to duplicate a entry as a draft entry?
ThreadText: # 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, username_0... it'd definitely need to be done through a plugin and [username_1](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?](https://craftcms.stackexchange.com/questions/11969/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.
  
  
  ---
  
  