Search code examples
extjsextjs4

Unrecognized class name / alias: widget.passwordfield


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

Solution

  • 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 :-) ).