Answers.Body: <p>As @carlcs mentioned, it's likely due to the way you're saving the ID...</p>
  
  <pre><code>&lt;input type="hidden" name="entryId" value="{{ entry.id }}"&gt;
  </code></pre>
  
  <p>I would omit this line to ensure you save a new comment each time.</p>
  
  <p>If you actually want to have a form that allows <em>editing</em> of existing comments, then you need to pass in the ID of the <em>comment</em>, not the ID of the parent entry.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-01T04:56:18.050Z
Answers.LastActivityDate: 2016-08-01T04:56:18.050Z
Answers.UserDisplayName: Simon East
Answers.Body: <p>You'll have to resubmit all the previous comments through hidden fields aswell. You can achieve this by looping through them in the form, and put their values into hidden inputs.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-21T14:42:02.390Z
Answers.LastActivityDate: 2015-06-21T14:42:02.390Z
Answers.UserDisplayName: Bob Olde Hampsink
Body: <p>I am trying to save comments using the core method "entries/saveEntry", but every time I submit the form the last comment is overwritten, is there a simple way of submitting this information to insert instead of update all the comments?</p>
  
  <p>I the form working in that it relates a comment to an entry using the following form:</p>
  
  <pre><code>&lt;form method="post" accept-charset="UTF-8"&gt;
      &lt;input type="hidden" name="action" value="entries/saveEntry"&gt;
      {{ getCsrfInput() }}
      &lt;input type="hidden" name="entryId" value="{{ entry.id }}"&gt;
      &lt;input type="hidden" name="fields[usercomments][new1][type]" value="comments"&gt;
      &lt;input type="text" name="fields[usercomments][new1][fields][commentuser]" value=""&gt;
      &lt;input type="text" name="fields[usercomments][new1][fields][commenttext]" value=""&gt;
      &lt;input type="submit" value="Publish"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I just dont get why the comments are being overwritten and how to just insert a new entry.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-04T10:47:12.760Z
Comments.Text: You're saving it with the same entry ID each time. There's another question on how to do comments related to an entry: ["Creating comments via a related section"](http://craftcms.stackexchange.com/q/2936/125). I think <s>Douglas' answer does</s> both answers do a great job explaining on how to do this properly.
Comments.UserDisplayName: carlcs
Tags: <entry><entrymodel>
Title: Comments being overwritten on save
ThreadText: # Comments being overwritten on save
  
  (Asked by: username_0 on 2015-03-04)
  
  I am trying to save comments using the core method "entries/saveEntry", but every time I submit the form the last comment is overwritten, is there a simple way of submitting this information to insert instead of update all the comments?
  
  I the form working in that it relates a comment to an entry using the following form:
  
  ```
  <form method="post" accept-charset="UTF-8">
      <input type="hidden" name="action" value="entries/saveEntry">
      {{ getCsrfInput() }}
      <input type="hidden" name="entryId" value="{{ entry.id }}">
      <input type="hidden" name="fields[usercomments][new1][type]" value="comments">
      <input type="text" name="fields[usercomments][new1][fields][commentuser]" value="">
      <input type="text" name="fields[usercomments][new1][fields][commenttext]" value="">
      <input type="submit" value="Publish">
  </form>
  
  ```
  
  I just dont get why the comments are being overwritten and how to just insert a new entry.
  
  **Tags:** entry, entrymodel
  
  > **Comments:**
  > **username_1**: You're saving it with the same entry ID each time. There's another question on how to do comments related to an entry: ["Creating comments via a related section"](http://craftcms.stackexchange.com/q/2936/125). I think <s>Douglas' answer does</s> both answers do a great job explaining on how to do this properly.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-08-01. Score: 1
  
  As @username_1 mentioned, it's likely due to the way you're saving the ID...
  
  ```
  <input type="hidden" name="entryId" value="{{ entry.id }}">
  
  ```
  
  I would omit this line to ensure you save a new comment each time.
  
  If you actually want to have a form that allows *editing* of existing comments, then you need to pass in the ID of the *comment*, not the ID of the parent entry.
  
  
  ---
  
  ### Answer by username_3 on 2015-06-21. Score: 1
  
  You'll have to resubmit all the previous comments through hidden fields aswell. You can achieve this by looping through them in the form, and put their values into hidden inputs.
  
  
  ---
  
  