Limit lenght of textfield

Hi

I have a form with some text-fields in it. I would like to limit the lenght of text you can enter in it, so that it stops accepting input, when this limit is hit.
In normal html-form I can set the maxlength property.

But what do I do in Webix?

-mads

You can set maxlength attribute

http://webix.com/snippet/c9cd9d6b

is it possible to change it at runtime?
I tried these two possibilities, but it doesn’t seem to work:

$$(actualField.id).data.attributes.maxlength=actualField.Max_Input
$$(actualField.id).define(“maxlength”,actualField.Max_Input);

how could we change the value of a property (ui.text) previously initialized?

You need to use .refresh to repaint the input in question

$$(actualField.id).config.attributes.maxlength=actualField.Max_Input 
$$(actualField.id).refresh();