Reputation: 21
In Orbeon xform, how to get selected drop-down label on change of drop-down in an input field.
I am able to get drop-down value but not it's label name. Please share ideas about how to obtain it.
Upvotes: 2
Views: 842
Reputation: 31743
To access the label, you need to use an Orbeon extension function, xxf:itemset()
, which returns the current itemset for a given selection control. For instance, if your control id is my-select
, you would call:
xxf:itemset('my-select', 'xml', true())/itemset/choices/item[@selected = 'true']/label
Upvotes: 2