Forum Academy Marketplace Showcase Pricing Features

Change value of text based on dropdown selection

Please how can I change the value of text based on what is selected in a drop down.

I want to change the displayed amount based on what is selected.

Hi there, @Buddha… if I was doing what you described, I would likely use an option set to define the options in the dropdown, and I would have an attribute on the option set that defines the value to show when a particular option is selected. Have you already tried going down that path? How are you defining the dropdown options?

Best…
Mike

If it helps, here are some screenshots of an example.

Here is the option set with the attribute, and you would modify the attribute for each option and enter the value you want to display when the option is selected from the dropdown.

Here is the dropdown.

dropdown

Here is the text element that displays the attribute associated with the option selected from the dropdown.

text

2 Likes

Man! I didn’t realize that could be done using options sets.

I’ll try it shortly. Thanks a mil!

1 Like

Hi Mike,

Is there a way to make one of the options preselected?

It’s currently blank

Thanks.

Sure, just set the Default value field of the dropdown element to the option you want to display by default.

1 Like

Thanks!

This topic was automatically closed after 70 days. New replies are no longer allowed.