I have this problem where I need to add a red asterisk beside a fieldLabel when a field is marked as \"required\" (or allowBlank: false)
In
I have a little bit shorter solution. I suggest to use form's 'beforeadd' event like this:
Ext.define('Ext.ux.form', {
extend: 'Ext.form.Panel',
initComponent: function() {
this.on('beforeadd', function(me, field){
if (!field.allowBlank)
field.labelSeparator += '*';
});
this.callParent(arguments);
}
});
Here is demo