# Insert reference field when submitting comment to CMS

**URL:** <https://forum.wixstudio.com/t/insert-reference-field-when-submitting-comment-to-cms/60173>\
**Category:** Ask the community\
**Tags:** code, question, cms, wix\
**Created:** [June 21, 2024, 8:45am UTC](https://forum.wixstudio.com/t/insert-reference-field-when-submitting-comment-to-cms/60173 "2024-06-21T08:45:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleph\_null](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/aleph_null/32/87328_2.png) [@aleph\_null](https://forum.wixstudio.com/u/aleph_null)\
**Post date:** [June 21, 2024, 8:45am UTC](https://forum.wixstudio.com/t/insert-reference-field-when-submitting-comment-to-cms/60173/1 "2024-06-21T08:45:40Z")

</div>

**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!

---

<div class="post-metadata">

**Author:** ![aleph\_null](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/aleph_null/32/87328_2.png) [@aleph\_null](https://forum.wixstudio.com/u/aleph_null)\
**Post date:** [June 21, 2024, 9:25am UTC](https://forum.wixstudio.com/t/insert-reference-field-when-submitting-comment-to-cms/60173/2 "2024-06-21T09:25:21Z")

</div>

Here is the answer.

[How to Create a Dynamic Form Entry with Velo | Wix Fix (youtube.com)](https://www.youtube.com/watch?v=M8rt2iqLX9E)
