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.
Douglas' answer doesboth answers do a great job explaining on how to do this properly. – carlcs Mar 04 '15 at 10:47