Results 1 to 6 of 6

Thread: How to set field width in editviewdefs.php ?

  1. #1
    houlejo is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Qc, Canada
    Posts
    116

    Default How to set field width in editviewdefs.php ?

    Hi,

    How to set a specific field width in editviewdefs.php ?

    Thanks.

  2. #2
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: How to set field width in editviewdefs.php ?

    There is a section "widths" in that file defining the column widths:

    PHP Code:
          'widths' => 
          array (
            
    => 
            array (
              
    'label' => '10',
              
    'field' => '30',
            ),
            
    => 
            array (
              
    'label' => '10',
              
    'field' => '30',
            ),
          ), 
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  3. #3
    houlejo is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Qc, Canada
    Posts
    116

    Default Re: How to set field width in editviewdefs.php ?

    Hi,

    thanks for that. But it's for all the fields if I'm right.

    How to change it only for one field ?

    Thanks.

  4. #4
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: How to set field width in editviewdefs.php ?

    As far as I know it is not possible to change the width for only one single field.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  5. #5
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: How to set field width in editviewdefs.php ?

    To change the width of single fields there is two possibilities.

    1. Use customCode to renderize the field, then include the size attribute, like:
    PHP Code:
       'customCode'=> '<input type="text" value="{$fields.field_name.value}" size="50">' 
    2. Use the display parameters attribute for your field, then specify the size attribute:
    PHP Code:
    'displayParams' =>  
    array ( 
      
    'field' =>  
      array ( 
        
    'size' => '50'
         ),
     ), 
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  6. #6
    houlejo is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Qc, Canada
    Posts
    116

    Default Re: How to set field width in editviewdefs.php ?

    Ah sounds perfect!

    I will try this for sure.

    Thanks !

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. editviewdefs custom code field value
    By jcbatalha in forum Developer Help
    Replies: 1
    Last Post: 2011-05-03, 02:08 AM
  2. Putting DIV tags around a field in editviewdefs.php
    By hadoob024 in forum Developer Help
    Replies: 6
    Last Post: 2011-03-29, 01:18 PM
  3. iFrame field width max 255
    By robwerks in forum Help
    Replies: 2
    Last Post: 2010-09-06, 03:41 AM
  4. how to set the width paramenter for a dropdown field?
    By latschFob in forum Developer Help
    Replies: 2
    Last Post: 2010-01-15, 12:30 PM
  5. Custom field width for panel
    By Heiner Heinzel in forum Developer Help
    Replies: 2
    Last Post: 2009-11-09, 11:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •