1. #1
    Ext User
    Join Date
    Oct 2010
    Posts
    31
    Vote Rating
    0
    V Srinivasan is on a distinguished road

      0  

    Default Problem with hiding the field label

    Problem with hiding the field label


    i have 3 radio buttons.based on selction of radio buton, a text box appears dynamically.
    The problem is that i am able hide and show the textfield based on radio button selection using the hidden property but not able to hide the label

    below i am able to hide using the fieldset.But i dont want the second fieldset

    {


    xtype:'fieldset',

    autoHeight:true,
    title:'Use Details',

    items:[{ xtype: 'radiogroup',columns: 1,fieldLabel:'Use Type',

    items: [
    { boxLabel: 'Input', name: 'rb-auto', inputValue: 1,checked:true,listeners: {
    'check': function(r, c) {
    if(c) {
    Ext.getCmp('id4').show();
    Ext.getCmp('id5').hide();
    Ext.getCmp('id6').hide();

    }
    }
    }},
    {boxLabel: 'Question', name: 'rb-auto', inputValue: 2,listeners: {
    'check': function(r, c) {
    if(c) {
    Ext.getCmp('id4').hide();
    Ext.getCmp('id5').show();
    Ext.getCmp('id6').hide();

    }
    }
    }},
    {boxLabel: 'Solution', name: 'rb-auto', inputValue: 3, listeners: {
    'check': function(r, c) {
    if(c) {
    Ext.getCmp('id4').hide();
    Ext.getCmp('id5').hide();
    Ext.getCmp('id6').show();

    }
    }
    }}



    ]}, {
    xtype:'fieldset',
    id:'id4',
    autoHeight:true,
    defaultType: 'textfield',
    items :[{

    fieldLabel: 'Applicable At',
    value:'All Cases',
    disabled:true


    }
    ]
    }, {
    xtype:'fieldset',
    id:'id5',
    autoHeight:true,hidden:true,
    defaultType: 'textfield',
    items :[{

    fieldLabel: 'Applicable At',
    value:'Specific Cases',
    disabled:true


    }
    ]
    }, {xtype:'fieldset',autoHeight:true,hidden:true,
    id:'id6',
    items:[{ xtype: 'radiogroup',fieldLabel:'Applicable
    At',columns: 1,

    items: [
    { boxLabel: 'All Cases', name: 'rb-auto', inputValue: 1},
    {boxLabel: 'Specific Cases', name: 'rb-auto', inputValue: 2, checked: true}


    ]}]

    }
    ]





    }

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Very common problem.

    This has been fixed in Ext 3.0.1, but for older versions you need this patch.

  3. #3
    Ext User
    Join Date
    Oct 2010
    Posts
    31
    Vote Rating
    0
    V Srinivasan is on a distinguished road

      0  

    Default


    Thanks.Its working now.The new problem i face now is that when i set textfield as disabled,the lablel is also appearing grayed out.
    how to make the fieldlabel look normal?

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Don't you want that? I actually like it!

    But if you don't want that, it's all css, so just tweak the css rules for the label.

Similar Threads

  1. label hiding problem
    By sseema in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 13 Oct 2008, 2:55 AM
  2. Hiding field + label
    By enickma in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 3 Sep 2008, 4:20 PM
  3. Hiding a Text field and also its label
    By mysticav in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Apr 2008, 11:21 PM

Thread Participants: 1