extjs add plugins to dynamic form fields

Posted by Anurag Uniyal on Stack Overflow See other posts from Stack Overflow or by Anurag Uniyal
Published on 2010-03-29T07:00:57Z Indexed on 2010/03/29 7:03 UTC
Read the original article Hit count: 691

Filed under:
|

I am creating a form dynamically from the fields returned from server using json e.g. data is

"items": [
    {"xtype": "textfield", "fieldLabel": "Name", "name": "name"}, 
    {"xtype": "textfield", "fieldLabel": "Description", "name": "description"}, 
    {"xtype": "textarea", "fieldLabel": "Text", "name": "text"}
],

Now I want to add a custom plugin to each field usually on client side I do this

plugins:new Ext.ux.plugins.MyPlugin()

but as my form fields are coming from server, how can I add plugin to field e.g. something like this (but that doesn't work)

"plugins": "Ext.ux.plugins.MyPlugin"

© Stack Overflow or respective owner

Related posts about extjs

Related posts about forms