1. #1
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    162
    Vote Rating
    1
    michael melsen is on a distinguished road

      0  

    Default required field marking

    required field marking


    hi guys,

    in ext3 I've used an override of the formlayout to adjust fieldlabels which have the config option allowBlank to be prefixed with an asterisk. This asterisks lets the user now that the field is required on a form. As the formlayout is no longer available in ext 4 I was wondering how I could simply fix this. I still didn't find a config option for this in ext, so I suppose it should be hacked into the code?

    kind regards,

    Michael

  2. #2
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    162
    Vote Rating
    1
    michael melsen is on a distinguished road

      0  

    Default


    anybody?

  3. #3
    Sencha User
    Join Date
    Jul 2008
    Posts
    3
    Vote Rating
    0
    hrliuhai88 is on a distinguished road

      0  

    Default


    Ext.override(Ext.form.Field, {
    initComponent:function () {
    this.callParent(arguments);
    this.on('beforerender', function (target) {
    if (target && !target.rendered && target.isFieldLabelable && target.fieldLabel && target.allowBlank == false) {
    target.fieldLabel += '<span class="req" style="color:red">*</span>';
    }
    })


    }
    })

Similar Threads

  1. Simple override for marking required fields
    By zhegwood in forum Ext 3.x: User Extensions and Plugins
    Replies: 5
    Last Post: 23 Jan 2012, 4:43 AM
  2. Replies: 0
    Last Post: 24 Aug 2010, 12:02 PM
  3. vtype is marking field invalid before ajax returns
    By hallikpapa in forum Ext 3.x: Help & Discussion
    Replies: 11
    Last Post: 25 Mar 2010, 4:12 PM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar