Get postId for comments in autoform

I am inserting comments using

{{> quickForm collection=“Comments” id=“insertCommentForm” type=“insert”}}

Schemas.Comments = new SimpleSchema({
  text: {
    type: String
  },
  postId : {
    type: String,
    autoform: {
      afFieldInput: {
        type: "hidden"
      }
    }
  }
});

My question is how to get postId automatically?

Have a look at callback hooks. Get the id inside the hook and modify the document before saving.

Thanks @rafael . Got it working.