We're almost there, loading your answer...

CMS: Connecting a Button to a Dataset

5 min read
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.  
Wix Editor
Studio Editor
  1. In your Editor, click the button you want to connect to the CMS. 
  2. Click the Connect to CMS icon .  
  3. 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.
  4. 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 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. 

Did this help?

|