Forum Academy Marketplace Showcase Pricing Features

Display dropdown labels instead of values

Much like the standard dropdown in HTML, for example:

<select>
  <option value="brand1">Volvo</option>
  <option value="brand2">Saab</option>
  <option value="brand3">Mercedes</option>
  <option value="brand4">Audi</option>
</select>

You can see that the label and values are different. Right now I have my dropdown value showing (ex: brand1), but I want to show them by their labels, which is much more human-readable. Where can I do that in the dropdown item?

I might be misinterpreting your question, but if you are using dynamic data in your dropdown, and would like to change the caption field in the dropdown, you can do so with the “Option caption” field.

1 Like

I’m currently using a static choice like so:

As a result, it displays the following options for my dropdown:

While keeping those values (ex: brand1), I want to have the dropdown associate those values to a “clean” label. The reason why I want to do this is because I have functions running that are determined by the values that I’ve set. However, they way that they are listed would be confusing to the user and they would have trouble identifying that brand1 actually represents Volvo.

In that case I would set up a Data Type with the different brands, with one Field for your internal name, and one for the actual brand Name. I can’t see anything stopping you from doing that from what you’ve written.

You could also drop the brand1/brand2 and call the functions from the actual brand name instead, but I suppose there is a reason you didn’t do that from the beginning.

I’m not aware of any way to change the label of static choices, unfortunately.

1 Like

You could also drop the brand1/brand2 and call the functions from the actual brand name instead, but I suppose there is a reason you didn’t do that from the beginning.

There is, the reason is that I have a feed that displays information based off of the brand that is chosen, it would look like the following:

http://example.com/feed/cars/brand1

As you can see, it goes by the brand’s ID value instead of the formal name, Volvo (in this case).

In that case I would set up a Data Type with the different brands, with one Field for your internal name, and one for the actual brand Name. I can’t see anything stopping you from doing that from what you’ve written.

After playing around based on you insight, I was able to create a Data Type and associate the brand name with the ID. This was very helpful, thank you.

1 Like

Awesome glad it worked out!