# CMS: Connecting a Button to a Dataset

Source: https://support.wix.com/en/article/cms-connecting-a-button-to-a-dataset (updated 2026-11-12)
Related: Wix developer documentation, https://dev.wix.com/docs/llms.txt; Help Center index, https://support.wix.com/en/llms.txt

Connect a button element to a dataset to define what happens when the button is clicked. For example, you could link a button to the "Submit" click action, a dynamic item page, or a document stored in your collection. You can also connect the button label to a collection field to show dynamic text on your button.

> The list of available dataset actions varies depending on the [dataset mode](https://support.wix.com/en/article/cms-working-with-the-dataset-mode-and-collection-permissions) and whether you connect to a regular dataset or a dynamic page dataset. Learn more about all the [available dataset click actions](https://support.wix.com/en/article/cms-about-dataset-click-actions-for-buttons-and-images).

> **Notes:**
>
> * Datasets aren't part of the Wix Harmony Editor. In Wix Harmony, you connect a repeater straight to your collection and manage the connections in the Manage Items panel. Learn more about [what's new with the CMS in Wix Harmony](https://support.wix.com/en/article/wix-harmony-whats-new-with-the-cms).
> * You can connect a button link to 'URL', 'Email', or 'Image' fields. To link a button in a repeater to an item page, you don't need a dataset. Learn more about [linking to dynamic pages](https://support.wix.com/en/article/cms-linking-to-dynamic-pages).
> * Dataset click actions (e.g. 'Submit') and CMS expressions aren't available in the Wix Harmony Editor. You can [vote for CMS expressions in Wix Harmony](https://support.wix.com/en/article/wix-harmony-editor-feature-request-using-cms-expressions-2).

---

## Connecting a button to a dataset

Once you connect a button to a dataset, you can see all the available connection types in the **Click action connects to** drop-down. The dataset is what binds elements on your page to your CMS collection content.

**Wix Editor:**

1. [Go to the relevant page in your editor](https://manage.wix.com/account/site-selector/?actionUrl=https%3A%2F%2Fwww.wix.com%2Feditor%2F%7BmetaSiteId%7D%3FeditorSessionId%3D%7Besi%7D%26).
2. Click the button you want to connect to the CMS. Learn how to [add a button](https://support.wix.com/en/article/wix-editor-adding-and-setting-up-an-icon-button).
3. Click the **Connect to CMS** icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2023/06/16/2d484f5d-e1bf-4d48-9e42-82216e8b88de/08e74518-edad-42f8-b007-c974ba767eb6.png) .
4. Click the **Choose a dataset** drop-down and select an existing dataset that connects to your collection. Alternatively, click **Add a Dataset**, then choose the collection you want to connect, give the dataset a name and click **Create**.
5. Click the **Click action connects to** drop-down and select the relevant option:  
   * **Dynamic Pages:** Choose the [dynamic page](https://support.wix.com/en/article/cms-about-dynamic-pages) you want to link to. Then choose how the link opens: **In the current window** or **As a new window**. Click the **Rel values (SEO)** drop-down to [set the link attributes](https://support.wix.com/en/article/adding-link-rel-attributes).  
   * **Dataset Actions:** Choose the [action you want the dataset to perform](https://support.wix.com/en/article/cms-about-dataset-click-actions-for-buttons-and-images) when the button is clicked.  
   * **Fields:** Choose the collection field you want to connect to. You can connect to the following field types: **Audio**, **Document**, **Email**, **Image**, **URL**, or **Video**. Learn more [about the field types and their content limitations](https://support.wix.com/en/article/cms-formerly-content-manager-supported-content-in-collection-field-types).  
   **Tip:** Select **+ Add** to [add a new field in your collection](https://support.wix.com/en/article/cms-formerly-content-manager-adding-a-field-to-a-collection) and link to it.

![Screenshot of connecting a button to a dynamic item page.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2023/08/29/27c70f13-53ae-464a-86df-651d9076bfa4/36275c7f-7d1f-43d8-b08a-cd4b2db1e34c.png)

1. (Optional) Display dynamic text in the button that changes based to the collection item it links to. Click the **Label connects to** drop-down and select the relevant collection field.  
**Tip:** Alternatively, you can use static text that doesn't change by going to the button settings.

![Screenshot of connecting the button label to a collection field.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2023/08/29/a50970ba-7291-4077-b23a-53fb2e04a234/0290ac87-b4a7-4b19-86f1-2df8ba0d4ac1.png)

1. Click the **Accessible name connects to** drop-down and select the field that best describes to screen readers what happens when the button is clicked.
2. (Optional) Connect 'Color' fields to your button:  
   1. Scroll down to **Colors** in the **Connect Button** panel on the right.  
   2. Click relevant tab to choose which button state you want to connect: **Regular**, **Hover**, or **Disabled**  
   3. Click the relevant drop-down menus to select the 'Color' field(s) you want to connect:  
         * **Text color connects to:** Connect a 'Color' field to the color of the text characters.  
         * **Icon color connects to:** Connect a 'Color' field to the button icon (if your button has an icon).  
         * **Border color connects to:** Connect a 'Color' field to the border color.  
         * **Background color connects to:** Connect a 'Color' field to the background color of the button.  
   4. Repeat this step for each button state you want to connect to a 'Color' collection field.

![Screenshot of the various color connecting options for a button in the Wix Editor.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2025/01/15/2aae0dbb-66c3-49f5-82f4-db1161477e14/23c270e9-d999-4ff8-b1fb-8ea9f908d1a6.png)

1. Click **Preview** to test your connections.
2. Click **Publish** if you are ready to make the changes go live.

**Studio Editor:**

1. [Go to the relevant page in your editor](https://manage.wix.com/account/site-selector/?actionUrl=https%3A%2F%2Fwww.wix.com%2Feditor%2F%7BmetaSiteId%7D%3FeditorSessionId%3D%7Besi%7D%26).
2. Click the button you want to connect to the CMS. Learn how to [add a button](https://support.wix.com/en/article/wix-editor-adding-and-setting-up-an-icon-button).
3. Click the **Connect to CMS** icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2023/06/16/2d484f5d-e1bf-4d48-9e42-82216e8b88de/08e74518-edad-42f8-b007-c974ba767eb6.png) .
4. Click the **Choose a dataset** drop-down and select an existing dataset that connects to your collection. Alternatively, click **Add a Dataset**, then choose the collection you want to connect, give the dataset a name and click **Create**.
5. Click the **Click action connects to** drop-down and select the relevant option:  
   * **Dynamic Pages:** Choose the [dynamic page](https://support.wix.com/en/article/cms-about-dynamic-pages) you want to link to. Then choose how the link opens: **In the current window** or **As a new window**. Click the **Rel values (SEO)** drop-down to [set the link attributes](https://support.wix.com/en/article/adding-link-rel-attributes).  
   * **Dataset Actions:** Choose the [action you want the dataset to perform](https://support.wix.com/en/article/cms-about-dataset-click-actions-for-buttons-and-images) when the button is clicked.  
   * **Fields:** Choose the collection field you want to connect to. You can connect to the following field types: **Audio**, **Document**, **Email**, **Image**, **URL**, or **Video**. Learn more [about the field types and their content limitations](https://support.wix.com/en/article/cms-formerly-content-manager-supported-content-in-collection-field-types).  
   **Tip:** Select **+ Add** to [add a new field in your collection](https://support.wix.com/en/article/cms-formerly-content-manager-adding-a-field-to-a-collection) and link to it.

![Screenshot of connecting a button to the dynamic item page.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2023/09/08/4995d999-8c0a-488e-be1d-664eea969157/c5623613-a1a5-45cc-aab8-c4e3d432a560.png)

1. (Optional) Display dynamic text in the button that changes based to the collection item it links to. Click the **Label connects to** drop-down and select the relevant collection field.  
**Tip:** Alternatively, you can use static text that doesn't change by clicking **Change Text**.
2. Click the **Accessible name connects to** drop-down and select the field that best describes to screen readers what happens when the button is clicked.
3. (Optional) Connect 'Color' fields to your button:  
   1. Scroll down to **Colors** in the **Connect Button** panel on the right.  
   2. Click relevant tab to choose which button state you want to connect: **Regular** or **Hover**  
   3. Click the relevant drop-down menus to select the 'Color' field(s) you want to connect:  
         * **Text color connects to:** Connect a 'Color' field to the color of the text characters.  
         * **Border color connects to:** Connect a 'Color' field to the border color.  
         * **Background color connects to:** Connect a 'Color' field to the background color of the button.  
   * Repeat this step for each button state you want to connect to a 'Color' collection field.

![Screenshot of the various color connecting options for a button in the Studio Editor.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2025/01/15/726229cb-705b-4e75-8edc-570244eae06f/8d3dccec-152a-4b77-a372-f04f3fd190a5.png)

1. Click the **Preview** icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/8696077d-830a-4b1e-bd86-9df98f89994a/2023/07/12/45e03e4e-437b-4067-977e-869c3ff1ddd7/357065e4-6113-4838-9dbd-edc880533773.png) at the top right to test your connections.
2. Click **Publish** if you are ready to make the changes go live.

---

## FAQs

Click below for answers to common questions about linking buttons in the CMS.

**Can I create a dynamic link that visitors click to send emails?**

Yes. You can create dynamic links that open the visitor's mail client (e.g., Outlook, Gmail) so they can send an email to the relevant address.

  
**Option 1: Use the Email field type (Recommended):** 

 The easiest method is to use the **Email** field type, which automatically validates email addresses and creates the link for you.

1. [Add an 'Email' field](https://support.wix.com/en/article/cms-formerly-content-manager-adding-a-field-to-a-collection) to your collection.
2. Enter the email addresses (e.g., support@email.com).
3. [Connect a button or image](https://support.wix.com/en/article/cms-connecting-a-button-to-a-dataset) to the dataset.
4. Set the **Click action connects to** drop-down to your 'Email' field.

  
**Option 2: Use a URL field (Alternative):** 

 You can also use a standard URL field if you prefer to manually format the link.

1. [Create a URL field type](https://support.wix.com/en/article/cms-formerly-content-manager-adding-a-field-to-a-collection) in your collection.
2. Add the email addresses with **mailto:** at the beginning of each address (e.g., **mailto:support@email.com**).  
![A screenshot of a URL field in a collection with mailto: added before each email address.](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/d6b40156-9694-4cfe-9209-54815ef9d6dc/2024/09/25/0b57535b-0a1f-4ebd-956b-48f923cf5f45/67e9f6ba-f489-408c-a7d7-9b7c309ed401.png)
3. [Link a button or image to a dataset](https://support.wix.com/en/article/cms-connecting-a-button-to-a-dataset) and connect it to this 'URL' field.

**Can I display dynamic text on my button?**

Yes, you can display dynamic text on your button. After connecting a button to the dataset, click the **Label connects to** drop-down and select the relevant collection field. The button label will change based on the collection item it links to.

**What types of content limitations should I be aware of when connecting to different field types?**

Each field type (Audio, Document, Email, Image, URL, Video) has specific content limitations. Ensure your content meets these limitations to avoid any issues with the button's functionality. 

  
 You can link buttons to the following dynamic collection fields in the dataset: 

* **Audio:** Open single audio files using file types such as MP3, WAV, FLAC, and more.
* **Document:** Open single document files such as PDFs, CSVs, and more.
* **Email:** Opens the visitor's mail client with the email address in the 'To:' field.
* **Image:** Open image files such as JPG, PNG, and GIF file types.
* **URL:** Open web addresses for each item. You can add the following characters to the beginning of the URLs to modify how they open:  
   * **mailto:** Opens the visitor's mail client set to send an email to the relevant address (e.g. **mailto:sales@email.com**)  
   * **sms:** Opens the visitor's application used to send SMS (text) messages (e.g. **sms:9254135555**).  
   * **tel:** Opens the visitor's application used to call a telephone number (e.g. **tel:9254135555**).
* **Video:** Open single video files using file types such as AVI, MPEG, MOV and more.

  
 Learn more about [supported field types and their limitations](https://support.wix.com/en/article/cms-formerly-content-manager-supported-content-in-collection-field-types).

**What should I use for the button’s accessible name field?**

To make your site more accessible, add an accessible name to each button connected to your CMS. Accessible names work like alt text, but are designed for buttons—they help screen readers describe what the button does or where it leads.

  
 We recommend creating a collection field for your button’s accessible name, and connecting it to the **Accessible name connects** to drop-down. The field should have a clear, helpful description of the button’s action or destination. For example, use “Read more about our services” or “Submit your application,” instead of a generic name like “Click here.”

  
 You can also use expressions to create more personalized names by combining static text with data from your collection. For example, you can use **CONCAT("Read more about ", title)** to help screen readers provide unique descriptions for each button.

  
 Adding accessible names improves your site’s accessibility and makes it easier for all visitors to navigate your content. Learn more about [CMS accessibility best practices](https://support.wix.com/en/article/accessibility-best-practices-for-the-cms#accessible-names-for-buttons).
