We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12410
    • 353 Posts
    hi guys,
    In modx manager the textfield tv width in migx spans the width of the page. how do i apply a width to it please so it looks neater
    Thanks

    MODX Revolution 2.2.0-pl2
    migx 2 beta 2
      • 4172
      • 5,888 Posts
      you can create another text-tv-input type where you give another or configurable width.
      See textbox.tpl:

      <input id="tv{$tv->id}" name="tv{$tv->id}"
      	type="text" class="textfield"
      	value="{$tv->get('value')|escape}"
      	{$style}
      	tvtype="{$tv->type}"
      />
      
      <script type="text/javascript">
      // <![CDATA[
      {literal}
      Ext.onReady(function() {
          var fld = MODx.load({
          {/literal}
              xtype: 'textfield'
              ,applyTo: 'tv{$tv->id}'
              ,width: '99%'
              ,enableKeyEvents: true
              ,msgTarget: 'under'
              ,allowBlank: {if $params.allowBlank == 1 || $params.allowBlank == 'true'}true{else}false{/if}
              {if $params.maxLength},maxLength: {$params.maxLength}{/if}
              {if $params.minLength},minLength: {$params.minLength}{/if}
          {literal}
              ,listeners: { 'keydown': { fn:MODx.fireResourceFormChange, scope:this}}
          });
          Ext.getCmp('modx-panel-resource').getForm().add(fld);
          MODx.makeDroppable(fld);
      });
      {/literal}
      // ]]>
      </script>
      
      
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 12410
        • 353 Posts
        Thanks