How to get index of selected value from dropdown?

I haven’t found a way to do this using bubble so I tried to do it using javascript (via the Toolbox Plugin). The Javascript for selecting a the current index of a dropdown selection is document.getElementById("kitchen_open_time").selectedIndex. For this to work on needs to turn on the Expose Element ID’s setting in the Setting’s Tab. I’ve don’t that but the Javascript toolbox error’s out on this expression. But I know the expression is right because it works in my browser’s console. Any ideas?

Is your Expression element set to the correct data type?

Hi @keith, thanks for jumping in to help! I actually figured it out with a little help from our friends on the toolbox plugin page. For interested viewers see the solution here

1 Like

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