PDA

View Full Version : Can't use your own vtypes on form fields.



TonySteele
6 May 2012, 7:17 AM
On form fields the VType drop down should allow you specify your own Ext.form.field.VTypes.

Since there is no method to set the VType (I think its only configurable) I have to create the whole form field and add it to the form in the render event.

ssamayoa
6 May 2012, 2:07 PM
You can add your edit field as top level view, create an override to set your custom vtype then use that component in your other views:



Ext.define('MyApp.view.override.MyTextField', {
requires: 'MyApp.view.MyTextField'
}, function() {
Ext.override(MyApp.view.MyTextField, {
vtype : "your-vtype"
});
});



Regards.