Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide textfield with label?

Tags:

extjs

I have textfield:

            {
                xtype: 'textfield',
                fieldLabel: 'LBL_EMAIL',
                anchor: '100%',
                listeners: {
                    'render': function(p) {
                        // check certain conditions
                        this.hide()
                    }
                },
            },

"hide()" only hides textbox (without label) and I want hide whole row (textbox and label). Any ideas?

like image 426
Maciej Kucharz Avatar asked Aug 27 '10 13:08

Maciej Kucharz


People also ask

How do I hide the input field label?

The best way to hide the label in form input field, is to pass empty value to array on 'attributeLabels()' function in the model. public function attributeLabels() { return [ 'id' => 'ID', 'gender' => 'Gender', 'client_name' => '', . . . ] } That doesn't remove the label. Just hides doesn't display a text.

How do you hide the input and label field in HTML?

The hidden attribute hides the <label> element. You can specify either 'hidden' (without value) or 'hidden="hidden"'. Both are valid. A hidden <label> element is not visible, but it maintains its position on the page.

How do you hide the value of a label?

Select any shipping label in the Print On menu. Check the Hide Postage Value option on the right, below the preview image of your label.

How do you hide label tags in CSS?

Hiding the label with display: none; is bad for web accesibility and you shouldn't do it. Try visibility: hidden; instead. yep, why I added a label I didn't want to see in the first place. display: block; height: 0; visibility: hidden; .


1 Answers

I found a solution, I have to configure the FormLayout with:

trackLabels: true
like image 70
Maciej Kucharz Avatar answered Sep 23 '22 01:09

Maciej Kucharz