An earlier question mentioned a method using the el
config in order to make the browser remember passwords. Howewer, the el
config no longer exists in ExtJS 4.1.
Now, what should I do?
If Chrome doesn't offer to save the password, make sure that the password-saving feature is actually enabled. To check this, go to Settings > Autofill > Password Manager. If the Offer to save passwords option is switched off, toggle it on. Now, Chrome will offer you to save passwords when you log in to any website.
Google Chrome has a setting that can be toggled (sometimes accidentally) that will delete all cookies every time the browser is closed. As of June 2022 in Chrome 103, the setting is located at Settings > Privacy and security > Cookies and other site data (or URL: chrome://settings/cookies ).
I believe it should be contentEl instead of el but I do this another way. You can build the entire thing with ExtJS directly. The only twist is that Ext fields will be created with the autocomplete=off attribute by default, so I use a derived class to override that.
Ext.define('ACField', {
extend: 'Ext.form.field.Text',
initComponent: function() {
Ext.each(this.fieldSubTpl, function(oneTpl, idx, allItems) {
if (Ext.isString(oneTpl)) {
allItems[idx] = oneTpl.replace('autocomplete="off"', 'autocomplete="on"');
}
});
this.callParent(arguments);
}
});
Ext.onReady(function() {
new Ext.panel.Panel({
renderTo: Ext.getBody(),
width: 300,
height: 100,
autoEl: {
tag: 'form',
action: 'login.php',
method: 'post'
},
items: [
new ACField({
xtype: 'textfield',
name: 'username',
fieldLabel: 'Username'
}),
new ACField({
xtype: 'textfield',
name: 'password',
fieldLabel: 'Password',
inputType: 'password'
}),
],
buttons: [{
xtype: 'button',
text: 'Log in',
type: 'submit',
preventDefault: false
}]
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With