I have singlePost
with postId
. In each singlePost
, I list comment.
Autoform for comment:
{{#autoForm id="updateCommentArray" type="update-pushArray" collection=Collections.Posts doc=commentDoc scope="comment" template="semanticUI"}}
{{> afQuickField name="content"}}
<div class="form-group">
<button type="submit" class="ui positive button">Submit</button>
<button type="reset" class="ui negative button">Reset</button>
</div>
{{/autoForm}}
What Autoform provide is to use scope to attach new array into specified field. For example, when I use scope comment.0.reply
, that reply will attach to first array of comment. When I use scope comment.1.reply
, that reply will attach to second array of comment. Etc
How to make it dynamic? What I thought is to use commentId
, but how?
Thank you