1. #1
    Ext JS Premium Member
    Join Date
    Dec 2008
    Posts
    85
    Vote Rating
    0
    jimtyp is on a distinguished road

      0  

    Default Switching allowBlank based on selections

    Switching allowBlank based on selections


    I have a form and a bunch of fields. Based on values entered, I'd like to change the allowBlank on some fields from true to false. Is this possible?

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, just change it.

  3. #3
    Ext JS Premium Member
    Join Date
    Dec 2008
    Posts
    85
    Vote Rating
    0
    jimtyp is on a distinguished road

      0  

    Default


    When I do this it doesn't work:

    var obj = Ext.getCmp('accessCard');
    obj.allowBlank = false;

    Initially the allowBlank is true for this field, but after a combo is selected I do the above code and was hoping the "submit" button would change to disabled, but it still shows enabled.

  4. #4
    Ext JS Premium Member
    Join Date
    Dec 2008
    Posts
    85
    Vote Rating
    0
    jimtyp is on a distinguished road

      0  

    Default


    Never mind, it does work, i had a typo, sorry about that. Thanks for your help!

Thread Participants: 1