Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3978800
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:05:31+00:00 2026-05-20T05:05:31+00:00

By removing a field in a fieldset, it’s label is not removed. How can

  • 0

By removing a field in a fieldset, it’s label is not removed. How can I remove it? I’m using ExtJS 2.0.2. Code follows:

var predicateArguments= new Ext.form.FieldSet({
    id:'predicate_arguments',
    layout:'form',
    title:'Predicate Arguments',
    defaultType:'textfield',
    autoHeight:true,
    autoWidth:true,
    autoScroll:true,
    items:[
        {
            xtype:'textarea',
            id:'description',
            fieldLabel:'Description',
            name:'description',
            readOnly:true
        }
    ],
    buttons: [
        {text: 'Add',
         handler:function(){
            //this will submit  the form's fields
            predicatesForm.getForm().submit();
         }},
        {text: 'Reset Fields',
         handler:function(){
            //this will reset the form's fields
            predicatesForm.getForm().reset();
         }}
        ]
})

var predicatesForm = new Ext.FormPanel({
    id:'predicates-form',
    region:'center',
    split:true,
    labelAlign:'right',
    layout:'column',
    items:[availablePredicatesGrid, predicateArguments]
})

var dateField = {xtype:'datefield',
                fieldLabel:'Date',
                name:'date',
                id:'date_field'
}

var numberField = {xtype:'numberfield',
            fieldLabel:'Number',
            name:'number',
            id:'number_field'
}

//when a rule is clicked do the following...
    availablePredicatesGrid.getSelectionModel().on('rowselect', function(sm,_rowIndex,_rule){
        predicatesForm.getForm().loadRecord(_rule);
        var _ruleType= _rule.store.getAt(_rowIndex).get('type');

        //removes previous existing fields (but not labels!)
        predicateArguments.remove('date_field');
        predicateArguments.remove('number_field');

        //creates new fields according to the selected rule types
        for(i=0; i<_ruleType.length; i++){
            if(_ruleType[i]=='date'){
                predicateArguments.add(dateField);
                predicateArguments.doLayout();
            }
            else if(_ruleType[i]=='number'){
                predicateArguments.add(numberField);
                predicateArguments.doLayout();
            }
        }
    });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:05:32+00:00Added an answer on May 20, 2026 at 5:05 am

    Instead of calling remove on your Ext.Element reference, do this instead:

    Ext.getCmp('id_of_your_form_field').getEl().parent().parent().remove();
    

    EDIT: this is intended for use on form field components, as it removes the wrapper div containing the label and the component

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using following code to converted entered number in text field to be formatted
I'm removing an element using remove() (it's a <li> with display: inline; set, although
I'm using a Javascript call to dynamically remove a field from a form. My
I have this code: <div class=editor-label> @Html.LabelFor(model => model.Ticket) </div> <div class=editor-field> @Html.EditorFor(model =>
Does anyone knows if removing the field names from an INSERT query results in
After removing hash from URL using window.location.hash='' page getting reloaded in firefox. EDIT Example:
I'm having difficulties removing the lineStyle lines in JTrees using Netbeans. In a standalone
I'm removing a component from the WindowedApplication, using removeChildAt(), and want to play an
I'm removing an item from an array if it exists. Two ways I can
In my user's data edit form I have a boolean field, for adding/removing email

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.