# CMS referenced field to dropdown value option

**URL:** <https://forum.wixstudio.com/t/cms-referenced-field-to-dropdown-value-option/53591>\
**Category:** Ask the community\
**Tags:** code, wix-studio, cms\
**Created:** [November 5, 2023, 11:21pm UTC](https://forum.wixstudio.com/t/cms-referenced-field-to-dropdown-value-option/53591 "2023-11-05T23:21:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gareth\_Barton](https://avatars.discourse-cdn.com/v4/letter/g/eada6e/32.png) [@Gareth\_Barton](https://forum.wixstudio.com/u/Gareth_Barton)\
**Post date:** [November 5, 2023, 11:21pm UTC](https://forum.wixstudio.com/t/cms-referenced-field-to-dropdown-value-option/53591/1 "2023-11-05T23:21:00Z")

</div>

Hi, im new to the Wix/EditorX system and now designing a new site . I’ve successfully setup 2 databases and a dynamic pages to display the content. I’m want to add to a Referenced Field within the Testimonials database to allow site visitors to add Reviews and then display them.  
Can this be done?

Any help would be greatly appreciated.

 ![screen1](https://us1.discourse-cdn.com/wix/original/3X/9/c/9c26619cde48d0d6fec0b517dc3a8d6250f2aef2.png)

2 Databases.

- Products
- Testimonials

Products - Read permissions

- Products Title - title
- mainImage - mainImage  
etc.

Testimonials - Write permissions

- Name - title
- Testimonial - testimonials
- Product - product (Referenced field with Products Title (title)

Page has #productView, #testimonialView, and #addTestimonial section on page

On #addTestimonial section

- #nameInput (Text)
- #productSelector (Dropdown)
- #testInput (Text)
- #submit (button)

---

<div class="post-metadata">

**Author:** ![simen](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simen](https://forum.wixstudio.com/u/simen)\
**Post date:** [November 6, 2023, 12:16pm UTC](https://forum.wixstudio.com/t/cms-referenced-field-to-dropdown-value-option/53591/2 "2023-11-06T12:16:17Z")

</div>

Yes, it’s possible, but I don’t think you can do it exactly the way you’re doing it now. You will need to use some Velo code.

I would use the datasets to display the info, then insert and insertReference to insert new feedback

> **[insert - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/wix-data/insert)**
>
> Adds an item to a collection. The insert() function returns a Promise that resolves to the inserted item after it has been added to the specified collection. ...

> **[insertReference - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/wix-data/insertreference)**
>
> Inserts a reference in the specified property. The insertReference() function returns a Promise that resolves when a reference to the referenced item(s) is ...

---

<div class="post-metadata">

**Author:** ![Gareth\_Barton](https://avatars.discourse-cdn.com/v4/letter/g/eada6e/32.png) [@Gareth\_Barton](https://forum.wixstudio.com/u/Gareth_Barton)\
**Post date:** [November 6, 2023, 11:14pm UTC](https://forum.wixstudio.com/t/cms-referenced-field-to-dropdown-value-option/53591/3 "2023-11-06T23:14:02Z")

</div>

Hi Simen,  
Thanks for steering me in the right direction. I think you’re right, it’ll need to be coded in. I had a look at those links you’ve provided and will have a go at coding that in

I have seen a post that may work but that uses the save () instead of insert () function. Not sure the exact differences between those.

---

<div class="post-metadata">

**Author:** ![simen](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simen](https://forum.wixstudio.com/u/simen)\
**Post date:** [November 7, 2023, 7:42am UTC](https://forum.wixstudio.com/t/cms-referenced-field-to-dropdown-value-option/53591/4 "2023-11-07T07:42:05Z")

</div>

> **[save - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/wix-data/save)**
>
> Inserts or updates an item in a collection. The save() function returns a Promise that resolves to the inserted or updated item after it has been added or ...

This save function?

The difference is that save will update the item if it already exists in the collection (based on if the \_id already exists). In this case I’m guessing the user will only inserting new items, not updating any.
