Getting value of toolbar input


I’ve added used addInput to create an input field on a toolbar. However, I can’t figure out how to refer to its value. Could someone give me a small example of how to obtain the value and assign it to a variable?

Thank you.


Is that what you mean?

myToolbar.addInput(itemId, pos, value, width);
var value = myToolbar.getValue(itemId);