Insert reference field when submitting comment to CMS

Question:
I have a dynamic page loading on Dataset A(user post). On the page, users can submit comments to Dataset B (comments table). Dataset B has a reference field to link to Dataset A. Is there a way to “connect” this when users submit. I.e, take the ID for the post from Dataset A and insert it into the reference field of Dataset B.

I had assumed that given the reference field is an option in the CMS, there would be built in methods for connecting these on page. I may be missing something obvious.

Product:
I’m using Wix Editor.

What have you already tried:
I thought automations and or a data hook might be part of a solution, I fear that mixing wix-data and datasets in my page code might be the only way!

Here is the answer.

How to Create a Dynamic Form Entry with Velo | Wix Fix (youtube.com)