How to fill a dropdown option list from a linked CMS dataset

I’m having trouble with
I have a data entry page for my newsletter editor to add monthly newsletters. We’ve decided to have an extra type of document so I’ve added a “Type” field to the CMS collection.

I’ve added a dropdown input item to the page so the editor can choose whether the document is a “newsletter” or a “contribution” - the only two values allowed in the CMS field. When I preview the page, the dropdown options are fixed at “small”, “medium”, “large” etc., from the input element rather than offering only my values from the CMS.

What have I tried?

See screen shot below. I have tried without the “show options from a collection” (I guess I should expect that to fail as it did) and with it active. The options still show as s/m/l/xl, not “newsletter”/“contribution”. The CMS collection sets the default to “newsletter” so I would expect that to be the default in the box initially.

Working in
Wix Editor

What’s happening is the dropdown is still using its built-in design choices, not your CMS field choices.

In Wix, connecting a dropdown’s value to a dataset field does not automatically replace the dropdown’s option list with the allowed values from that CMS field. The dataset connection only tells Wix what to save, not what choices to display.

That is why you are still seeing Small / Medium / Large.

The fix

For your case, since there are only 2 valid options, the best solution is:

  1. Select the dropdown
  2. Click Manage Choices
  3. Delete the default options:
  • Small
  • Medium
  • Large
  • etc.
  1. Add only these two choices:

Label: Newsletter
Value: newsletter

Label: Contribution
Value: contribution

Then keep the dropdown connected to your CMS field

Thanks Dan. That sort of makes sense but it’s also confusing when you look at the first screenshot where I’ve circled the “Show options from a collection” switch activated. What does that switch do if not what I assumed - filling in the options in the pull-down?

Even more confusing, is the fact that the design option shows this…

And then there’s this from the “manage choices” option…

Follow these steps:

  1. First, disconnect the dropdown from the dataset (right where you’ve circled in your first screenshot).
  2. Once the ‘Choose a dataset’ field is set to Not Connected, click on the Manage Choices button. This is where you will see the default choices, i.e. Small, Medium Large, etc. Delete those and add your two options: newsletter & contribution.
  3. Now from the inspector panel, connect the dropdown back to the dataset. Make sure that you DO NOT connect the list options this time, that should be turned off.
  4. If you see a setting that says use this dropdown to Filter Content / Collect Content, set it to Collect Content.

And that should be it.

1 Like