Results 1 to 5 of 5

Thread: FieldSet enable/disable

  1. #1

    Default FieldSet enable/disable


    I've noticed that if I disable() / enable() a fieldset, the widgets included in the set appear as disabled or enabled, but internally they are not disabled [as example, they are validated on form submit]. It seems that the disable and enable methods on fieldsets don't apply recursively to the contained widgets.
    Is this normal?


  2. #2
    Sencha Premium Member
    Join Date
    Jun 2007


    Well, if your validation allows them to be empty, then validating them shouldn't be a problem.

    If the user disables them, you can just set them to be empty before disabling, thereby allowing them to pass validation.
    I'm pretty sure disabling a field doesn't remove it from the form - it will still be submitted (I might be wrong, though).

  3. #3


    Hi Pianoroy,

    I can confirm that disabled elements aren't checked for validation, so disabled fields can pass validation even if invalid. But this is not a problem.

    The problem, from my point of view, is that disabling a FieldSet does not disable the objects it contain, even if they appear visualy disabled (I think it is browser/HTML feature).
    But if they are invalid, the form can't be submitted because for Ext they are still enabled but visually, for the user, they appear as disabled.

    I think the disabling a FieldSet (Ext object) should also disable all contained Ext objects too.

  4. #4
    Ext User
    Join Date
    Aug 2007
    North Somerset, UK


    I also encountered this problem, except that I was using form layouts rather than fieldsets but this solution should work for you too.

    I noticed that disabled items had the class ".x-item-disabled" added to them, so if I check for any parents with that class on the validation event then I can return that item is valid.

    Add this to your page:

    Ext.override(Ext.form.Field, {
    	    validate: function(){
    			return true;
    	        if(this.disabled || this.validateValue(this.processValue(this.getRawValue()))){
    	            return true;
    	        return false;

  5. #5
    Sencha User
    Join Date
    Sep 2014


    Why do you guys start talking about validation? That's not what the question is about.I have the same problem where I enable the fieldset, but visually the fields remain disabled.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts