[2.0][SOLVED] tabs in a form in a window - padding [Archive] - Ext JS :: (just as in the examples/form/dynamic.js in the distribution) the result setting. bodyStyle: padding:10px on the tabpanel itself (not on the child panels) http://extjs.com/forum/archive/index.php/t-20193.htmlHOME | Hi,
I am wondering if I can set labelSeparator of textfields in formPanel dynamically.
I need to change labelSeparator of one textfield based on user's selection on other combox box in my formPanel.
Following code is not working right now.
prescriber is comboBox and state_license is textfield. Help on creating a drop =down input box with static values. [Archive :: With the jsonTypeList being set from the Business Layer and is a JSonObject and { fieldLabel: Name, hiddenName:name, displayField:text, valueField:value http://extjs.com/forum/archive/index.php/t-36713.htmlHOME |
prescriber.on('select',function(){
if(prescriber.getValue()=='No'){
state_license.labelSeparator = '*';
}else{
state_license.labelSeparator = '';
}
});
Thanks.
labelSeparator is just a config containing the text, you can't change at runtime. You could probably do something similar to the examples that remove or hide the label on the fly by using up() to get the container. See this example (http://extjs.com/forum/showthread.php?t=11698).
var f = frmAttendee.getForm().findField('state_license');
if(prescriber.getValue()=='Yes'){
document.getElementById(f.container.up('div.x-form-item').id).childNodes[0].innerHTML = 'State License#*';
}
else{
document.getElementById(f.container.up('div.x-form-item').id).childNodes[0].innerHTML = 'State License#';
}
I just changed the fieldLabel by manipulating DOM to show red asterisks. That's fine for me.
Hello,
Can you explain this code to me
f.container.up('div.x-form-item').id
I understand that variable 'f' is of type Ext.Form.Field.
Thanks
Hello,
Can you explain this code to me FormPanel Not Loading Dynamic Fields [Archive] - Ext JS Forums:: the form (form.load) it will not set the value of any of the check { xtype:radio, fieldLabel:status, name:display, boxLabel:show, inputValue:y http://extjs.com/forum/archive/index.php/t-30283.htmlHOME | IMS Common Cartridge Profile:: 2.5 Execution of Dynamic Content - Client-side 15 6.3 Test Data Set 70. Appendix A - Profile XSDs 71. Appendix B - Profile Schema Package 72 http://ims.edna.edu.au/cc/CCv1p0pd/imscc_profilev1p0pd.htmlHOME |
f.container.up('div.x-form-item').id
I understand that variable 'f' is of type Ext.Form.Field.
Thanks
According to tryanDLS's link http://extjs.com/forum/showthread.php?t=11698, I found that
f.container.up('div.x-form-item').id is the html id of outer div wrapping around my textfield's label and input text box. I got that from firebug's inspect tool. My fieldlabel is first child node of that div element. I think it could be different for your formpanel layout. You should inspect with your firebug. I can't really explain that code as I got it from above mentioned forum thread. API documentation would help you.
Hello,
Can we control the spacing between a field and its label?
Thanks
Hi markfigley,
Try labelWidth config option when you create formPanel's items.
labelSeparator is just a config containing the text, you can't change at runtime. You could probably do something similar to the examples that remove or hide the label on the fly by using up() to get the container. See this example (http://extjs.com/forum/showthread.php?t=11698).
Hello,
Can we control the spacing between a field and its label?
Thanks
labelSeparator is just a config containing the text, you can't change at runtime. You could probably do something similar to the examples that remove or hide the label on the fly by using up() to get the container. See this example (http://extjs.com/forum/showthread.php?t=11698).
Thanks, I will try that.
Red Hat's Rough Recovery From CFO Exit
Windows Live Finds a New, Pre-installed Home |