# how add reference fields in form submission with three collections.

**URL:** <https://forum.wixstudio.com/t/how-add-reference-fields-in-form-submission-with-three-collections/32730>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [March 4, 2020, 1:33pm UTC](https://forum.wixstudio.com/t/how-add-reference-fields-in-form-submission-with-three-collections/32730 "2020-03-04T13:33:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sakalabattulakoteswa](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sakalabattulakoteswa](https://forum.wixstudio.com/u/sakalabattulakoteswa)\
**Post date:** [March 4, 2020, 1:33pm UTC](https://forum.wixstudio.com/t/how-add-reference-fields-in-form-submission-with-three-collections/32730/1 "2020-03-04T13:33:40Z")

</div>

Hi  
i have three collections ,creating reference fields in showcast dataset and then those reference fields taken from other two collections one is people dataset and castroles dataset.  
but i am connects user inputs showcast dataset in this form.  
if you have any examples please send me.

 ![](https://us1.discourse-cdn.com/wix/original/3X/f/d/fd6fd91c95a9f091621f26d4b6785259219ddf6b.png)

 ![](https://us1.discourse-cdn.com/wix/original/3X/f/2/f2a2bb69037e0adb1bca1d20eeee8ca5f82af53a.jpeg)  
Thanks &Regards  
koteswararao.

---

<div class="post-metadata">

**Author:** ![alvarezcarlosg](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/alvarezcarlosg/32/17464_2.png) [@alvarezcarlosg](https://forum.wixstudio.com/u/alvarezcarlosg)\
**Post date:** [March 6, 2020, 4:31am UTC](https://forum.wixstudio.com/t/how-add-reference-fields-in-form-submission-with-three-collections/32730/2 "2020-03-06T04:31:09Z")

</div>

I’m not sure if I understand

But if you want to save an item with a referenced item then you must save it manually with the **insert** function and you must use the referenced item id.

If you don’t have the id handy then make a query to look by the title and then extract the id from there and then insert.

---

<div class="post-metadata">

**Author:** ![sakalabattulakoteswa](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sakalabattulakoteswa](https://forum.wixstudio.com/u/sakalabattulakoteswa)\
**Post date:** [March 12, 2020, 6:43am UTC](https://forum.wixstudio.com/t/how-add-reference-fields-in-form-submission-with-three-collections/32730/3 "2020-03-12T06:43:31Z")

</div>

hi  
thanks for your response … if you have any examples please send me,like code snippets using insert reference code  
Thank you.
