Unrecognized class name / alias: widget.passwordfield

180 Views Asked by At

In extjs when trying to add xtype:'passwordfield' i'm getting this following error:

Unrecognized class name / alias: widget.passwordfield

Synchronously loading 'widget.passwordfield'; consider adding Ext.require('widget.passwordfield') above Ext.onReady
1

There are 1 best solutions below

10
Arthur On

According to your tag, you are using ExtJS 4. passwordfield is for ExtJS 6+ modern. So, in ExtJS 4 you would use:

{
        allowBlank: false,
        fieldLabel: 'User ID',
        name: 'user',
        emptyText: 'user id'
    },
    {
        allowBlank: false,
        fieldLabel: 'Password',
        name: 'pass',
        emptyText: 'password',
        inputType: 'password'
    }

Check the Login Form in the examples (and bookmark that page :-) ).