header-logo
Getting started with WixBuild your website and business with Wix. Try using our AI tools to create your website, customize templates, or hire professionals to build or enhance your online presence.
Creating a websiteRead how to use the Wix Editor and manage content on your site. Discover how to protect your visitors' privacy and make your site accessible.
Account & billingReview your account settings, manage your subscriptions and plans and understand your invoices.
Using the Wix mobile appsUse our mobile apps to run your business efficiently on the go and set up a dedicated app for your site members to stay in touch.
Connecting a domainFollow our step-by step guides to learn how to purchase, connect or transfer a domain for your site, and find out how to keep your site’s data secure.
Managing your businessGet tools to grow your business and web presence. Find the right tools for your specific needs, set up online payments and keep track of your site's analytics.
Promoting your siteLearn to make your site more visible promoting it on search engines, sending emails and running paid ads. Improve your online presence with practical tips.
Studio, Partners & EnterpriseGet the most out of your Studio or Enterprise account with advanced features that'll help you work more efficiently.
Need more help?Find solutions for site performance and technical issues, learn about issues we’re working to fix or contact us for help.
placeholder-preview-image
Wix LearnImprove your skills with our courses and tutorials.
Wix BlogGet tips for web design, marketing and more.
SEO Learning HubLearn to increase organic site traffic from search engines.
Website developmentBuild a custom site using our full-stack platform.
Hire a ProfessionalGet matched with a specialist to help you reach your goals.
placeholder-preview-image
In this article
  • Connecting a button to a dataset
  • FAQs

CMS: Connecting a Button to a Dataset

In this article
  • Connecting a button to a dataset
  • FAQs
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 and whether you connect to a regular dataset or a dynamic page dataset. Learn more about all the available dataset click actions

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.  
  1. Go to the relevant page in your editor.
  2. Click the button you want to connect to the CMS. Learn how to add a button
  3. Click the Connect to CMS icon .  
  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:
Screenshot of connecting a button to a dynamic item page.
  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.
  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.
  1. Click Preview 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. 

Helpmate

Hello

Need a bit more guidance?
Unlock personalized helpLog in to get the most out of Helpmate.