How do I get the text value of a selected option?
How do I get the text value of a selected option?
Hello,
I need to store the selected text for another step in a process and I seem to only be able to get the value (not text) by using; $(this).val()
The event I've wired up is the "input().on('change')" as seen below.
editor.field('Vendor').input().on('change', function(e, d) {
if (d && d.editorSet) return;
editor.field("VendorOptionId").set($(this).val());
editor.submit();
showSaveButton(true);
});
Please let me know if there's a way to get the text from the associated select list option.
Thank you,
~ Dave
This question has an accepted answers - jump to answer
Answers
You can use a little bit of jQuery along with the
field().input()
method for this:Allan