ExtJS 5 Textfield Chrome Bug Fix

Posted By Vitaliy | July 03, 2015 | ExtJS 5.0.0
1 3553
This bug can be fixed by single css line: .x-form-text { display: inline; }

Js Code

Ext.onReady(function () {
    Ext.widget({
        title: 'Form',
        xtype: 'form',
        width: 400,
        frame: true,
        bodyPadding: 10,
        items: [{
            fieldLabel: 'Bug field',
            xtype: 'textfield'
        }, {
            fieldLabel: 'Fixed field',
            xtype: 'textfield',
            fieldCls: 'fixed'
        }],
        renderTo: Ext.getBody()
    });
});
            

ExtJS 4 Custom VType

Posted By Vitaliy | February 11, 2013 | ExtJS 4.1.1
0 3349
​You should add your validation method to Ext.form.field.VTypes.
Also add "<yourvtype>Text" (e.g. uniquenameText) property to show as error message.

Js Code

Ext.apply(Ext.form.field.VTypes, {
    uniquename: function (v) {
        return Ext.form.field.VTypes.uniquenameRegex.test(v);
    },
    uniquenameRegex: /^[a-z]{1}[a-z_0-9]*$/,
    uniquenameText: 'Invalid unique name'
});
            

How to add button to each form field?

Posted By Vitaliy | August 15, 2012 | ExtJS 4.1.0
0 3218
Reply to thread

Js Code

var fieldcontainer = Ext.widget({
	xtype: 'fieldcontainer',
	layout: 'hbox'
});

var field = Ext.widget(item);

fieldcontainer.add(field);
fieldcontainer.add(Ext.widget({
	xtype: 'splitter'
}));
var clearer = Ext.widget({
	xtype: 'button',
	field: field,
	disabled: field.disabled,
	handler: function () { this.field.reset(); }
});
fieldcontainer.add(clearer);