We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27519
    • 275 Posts
    In the insert and update windows used by for example modExtra there appears to be a fixed amount of real estate for field labels.

    Is there any way I can tweak that or - even better - make it dependable on the longest label string?

    I looked at ExtJs layouts but could not find any pointers in the example apps.

    Thanks.
      MODx Revolution / MAMP / OS X
      • 28215
      • 4,149 Posts
      splittingred Reply #2, 16 years ago
      Add a ’labelWidth’ property to the FormPanel config, not on the field config itself. From what ExtJS says, it takes a number for X pixels in width.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 27519
        • 275 Posts
        Yep, that did it. Thanks.
          MODx Revolution / MAMP / OS X
          • 1778
          • 659 Posts
          Hello

          BTW if you want to modify the width for only one label, you can specify it by using the labelStyle in the field config like that

          xtype: 'textfield',
          fieldLabel: _('cispeo.phone'),
          labelStyle: 'color:green; font-style:bold; width:130px;',
          name: 'phone1'
          


          Cheers