Limit the number of characters in an input button (toolbar)

Hello,

I am searching how i could limit the number of characters in the “inputbutton” of my toolbar.

Thanks you for your help :slight_smile: .

Vinou

Hi,

var id = “filter_text”; // id of your item
var inp = toolbar.objPull[toolbar.idPrefix+id].obj.childNodes[0]; // this will return DOM element

then you may add maxlength attribute for example.

Thanks you for your answer. However, how will i do in order to put the “maxLength” ?

You can use inp.setAttribute(attr, value) for example.

Thank you for your help.