PDA

View Full Version : Removing a plugin (InputTextMask) dynamically from a field



29er
12 Apr 2010, 10:59 AM
Hi all,
I have a text field that get initialized with a ux plugin (InputTextMask).
However, i need to be able to dynamically remove this 'textmask' depending on user input.
I have tried a couple of things.


var field = myForm.getForm.findField('mytextfield');

field.plugins.clear();

as well as



field.events['blur'].clearListeners();
field.events['focus'].clearListeners();
field.events['render'].clearListeners();


both of these don't work, as the mask continues to exist.

I am not sure the correct way to do this. should i just remove this field from the DOM and create insert another one dynamically ?
thanks for some direction !