I have a dropdown list and i want to recover the label name in a text field but it show me the value of the dropdown.
-- Thank you ! You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
I tried to follow the steps in this link : http://qaoverflow.com/question/in-orbeon-xform-how-to-get-selected-drop-down-label-on-change-of-drop-down-in-a-input-field/ but it didn't work You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Firas,
Using xxf:itemset() is indeed the way to go. You can find more about it on: http://doc.orbeon.com/xforms/xpath/extension-controls.html#xxfitemset If this doesn't help, can you tell us exactly what is the XPath expression you used and that doesn't work for you? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
It's work for me just the first label , i tried selected='true' but it not work for me
-- Le vendredi 12 août 2016 21:13:09 UTC+1, Alessandro Vernet a écrit : Hi Firas, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by Alessandro Vernet
It's work for me just the first label , i tried selected='true' but it not work for me You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Firas,
The XPath expression isn't using xxf:itemset(), which would explain why it isn't working. But I thought you were telling is that using xxf:itemset() didn't work for you; did I misunderstand your message? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alessandro
-- in fact I want to display the label of the current dropdown. before it shows me the value but after writing " $ form -resources / control- 2 / item / label " on the setting- control > Calculated value , it just shows me the first label. So I want to know the instruction to display the current label . Le lundi 15 août 2016 18:21:08 UTC+1, Alessandro Vernet a écrit : Hi Firas, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Firas,
Assuming the name of your dropdown control, as set in Form Builder, is my-dropdown, then you can get the label for the currently selected value with: xxf:itemset('my-dropdown-control', 'xml', true())/itemset/choices/item[@selected = 'true']/label You'll let us know if this helps, Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |