Get 'Text Field' value from a Select dropdown - not just the 'Value Field' value

Hi all,

When we use a ‘Select’ there are two Options Properties ‘Text Field’ and the ‘Value Field’.

The ‘Value Field’ is what is always passed to the BE via Server Connect. What I’d like to be able to also do is extract the value in the ‘Text Field’ at the same time.

I believe this has been discussed a couple of times but can’t see any outcomes, wondering if anyone has a workaround to get both the Text Field and Value Field into the SC?

Thanks

Not sure what exactly you are asking? You can have what ever you want as the value of a selected item?

1 Like

I wrote that way too fast, I’ve updated! :sweat_smile:

There should be a text value here: (as well as value)
image

1 Like

I’m sorry Ben, I don’t really understand what you mean? There isn’t one - so are you saying they should implement it?

Correct! It is easy to do in JavaScript as per

document.getElementById("select1").options[document.getElementById("select1").selectedIndex].text;

so it should be easy to add to Wappler.

Got it! I think there was already a feature request for this, I’ll take a look and vote if I haven’t already. Such a valuable add-on and small to implement it seems.

1 Like

It would certainly be a useful feature. @s.alpaslan provided a customer formatter for this here.

1 Like

Thank you Tom. I created a less than optimum workaround but this formatter will be much better.