When using .hide() on att TextField the associated label is still visible. Is it suppose to be that way or what? Feels kind of silly to have the label visible when the input field is hidden.
When using .hide() on att TextField the associated label is still visible. Is it suppose to be that way or what? Feels kind of silly to have the label visible when the input field is hidden.
try this
Code:new Ext.form.TextField({ fieldLabel: elem[i].label, name: elem[i].id, itemCls : 'invisible' })
hide() on a textfield hides the textfield. That's how it should work. If you want to hide the textfield and it's label there are other ways to go about it. (One posted above)
Jack Slocum
Sencha Co-Founder, Ext JS Founder
Original author of Ext JS 1, 2 & 3.
Twitter: @jackslocum
It is indeed strange to display the label and not the textfield
Maybe add a parameter to the Field.hide(true) to also hide the label.. or just thinking maybe hiding the label should be default and can be change by a parameter... or add an extra field.hideLabel()
Thanks
Marco
So if one wanted to share a form between two functions (e.g. an Add and and Edit function) what might be considered best practice for hiding one of the TextFields (and it's label) that is only applicable to one of the operations?
the hidden true does indeed do whats its suppose to, but the job is still only one third done. I still need to hide the label and the semicolon. giving a blank label will take care of that, but its still : there. What I am really after is just the equal of <input type='hidden' .. how can I do this?
You could set the labelStyle:'display:none', or labelSeparator:' ' or ' '
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
Anyone with SVN access care to add that labelStyle and labelSeparator config options to the API docs please?![]()
Hi All - New to all of this. First I have to say that I love this library. I think a great job was done by all involved putting this together. After reading this I still can't get the label to appear/disappear. I agree it is kinda silly to have the label but not the form element visible. Seems to me that you should be able to directly access each Config setting within an element. Something like ext.formpanel.elementid.hiddenLabel=true this way you could easily set any config setting in a function and handle it through an event ect. Also a hideall and showall for a particular form element would be helpfull as well. It would simply hide or show everything that has a display under that elment. When I first set hide I assumed this would happen. Am I missing something? I ran around in circles for hours and hours and hours over this one. Is there a cleaner way to do it then is discribed here and also if a bit more code context could be put around the examples I would REALLY appriciate it. I'm still wet behind the ears! Many thanks in advance.
-mike