Closed jgastonraoul closed 3 years ago
You can use the dropdown's label property:
Displayed text (defaults to current value). Keywords %key and %value will be replaced by the widget's selected key/value.
Another question : is there a way to change widget value only if the received value matches one of the items ? (currently, if I send something which is not in the list, the display is emptied and "undefined" is sent to the target).
No, but I could add an option to to ignore invalid values.
You're so quick to answer !
Thanks for the %key tip, it works like a charm !
The option to ignore invalid values would be very helpful.
One more question : is there a way to set the menu item by sending the label instead of the value ?
Maybe by receiving the value with a script widget first and doing some parsing magic, or using a custom module, but otherwise no, the widget expects values.
Hi !
I'm trying to use dropdown widget, and it displays the labels in the dropdown list and the value when I select an item. Is there a way to display only the label ? (the user doesn't have to know what is the value corresponding to the item).
Another question : is there a way to change widget value only if the received value matches one of the items ? (currently, if I send something which is not in the list, the display is emptied and "undefined" is sent to the target).