ExtJS 4 - Mark a red asterisk on an required field

后端 未结 11 2303
长发绾君心
长发绾君心 2020-12-08 08:24

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

11条回答
  •  臣服心动
    2020-12-08 08:49

    If you don't want to override anything, put the asterisk in the labelSeparator:

    {
      xtype: 'textfield',
      fieldLabel: 'Name',
      name: 'requestor_name',
      allowBlank: false,
      labelSeparator : ': *'
    }
    

提交回复
热议问题