Results 1 to 4 of 4

Thread: Chaniging custom field size on form

  1. #1
    ldbtractor is offline Member
    Join Date
    Sep 2008
    Posts
    7

    Default Changing custom field size on form

    G'day

    I have used SugarCRM for quite some time, but am new to customizing it. I have been searching for how to alter the field size of a custom field as it displays on the form. I have a field that is only 3 characters in the database and field definition, but as long as my 80 character fields on the form.

    I can find good bits on how to alter the field size of the database column using vardefs but can't seem to hit on what I'm looking for. Any advice on what subject I could search for? Any pointers to articles? I've already read the manuals and gone back poking to see. I've wandered through the admin in hopes I'd missed a checkbox for "all fields the same size" or something. Can someone please point me in the right direction?

    Cheers......

    --
    ldb
    Last edited by ldbtractor; 2008-10-09 at 10:39 PM. Reason: spelling fix

  2. #2
    DigiCRM is offline Senior Member
    Join Date
    Sep 2008
    Posts
    84

    Default Re: Chaniging custom field size on form


  3. #3
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Chaniging custom field size on form

    Hi ldb

    Edit the file custom/modules/<ModuleName>/metadata/editviewdefs.php. If this file does not exist then copy it from modules/<ModuleName>/metadata/editviewdefs.php.

    Look for the field_name you are trying to modify the size in the form.

    You should see something like that:

    PHP Code:
      array (
        
    'status',
        
    'account_name',
      ), 
    Supposing your field is the 'status' then you can override the 'status', by

    PHP Code:
    array(
      
    'name' => 'status',
      
    'displayParams' => array('size' => '3'),
    ), 
    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  4. #4
    ldbtractor is offline Member
    Join Date
    Sep 2008
    Posts
    7

    Default Re: Chaniging custom field size on form

    Thank you both very much. I had read previously read the link DigiCRM provided but didn't take into account that I could reverse the suggestions to make the field smaller (the size as the field in my table). And andopes of course is much appreciated and clear......;-)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. custom field to sugar field
    By tanhaa in forum Developer Help
    Replies: 2
    Last Post: 2011-05-04, 03:52 PM
  2. Custom Field Problem (bug?)
    By zmao in forum Help
    Replies: 5
    Last Post: 2007-11-13, 05:57 PM
  3. Custom Field not showing up
    By uswcc in forum Help
    Replies: 4
    Last Post: 2007-05-16, 01:37 AM
  4. Replies: 1
    Last Post: 2006-06-16, 03:35 AM
  5. Error when adding custom field
    By arrigenna in forum Help
    Replies: 0
    Last Post: 2006-03-31, 05:26 PM

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
  •