Get Selected Text from Select Control

Hi.
I have found my self using the where functions a lot of times when I need to access the text part of a dynamically bound select html control.
When we select something in the list based on text, the value part is usually an id. And this is the same that is returned when we use select1.value.

In many cases, I find that I have some other part of the page where I need to show the text part of the selected item in select control.
To do this, I use where on the original binding source server connect/array with == operator on select1.value. eg: scListItem.data.query1.where(id, select1.value, "==")[0].name.
Selected index could also be used, but sorting at binding time might lead to incorrect output.

Having a direct “Wappler” option to get SelectedText would be a great option to have.
image

Just like value & selected index, a selectedText would be amaazing.

Community Page
Last updated: