Results 1 to 5 of 5

Thread: Html input maxlength changes

  1. #1
    BrianSteffens is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    15

    Default Html input maxlength changes

    Hello,

    I've put the sugar database in a MySQL cluster, and was required to shorten some field lengths (varchar sizes) to accommodate the ndb storage engine's 8k row size limit. It only affected a few tables, but I'm wondering where I'd start to fix up the front end php code to reflect these changes. Basically I'm looking for whatever controls the maxlength variable in input type="text" html tags that are generated. Where might I look to find these things?

    Thank you

  2. #2
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: Html input maxlength changes

    Hello BrianSteffens,

    It may be easiest to use the Studio (found in Admin) to make these changes. Using the Studio will ensure that the changes are upgrade-safe.

    If you'd like to search through the metadata files to find these fields, check in vardefs.php files-- this controls the properties of the fields. Here's an example from ./modules/Accounts/vardefs.php (or ./cache/modules/Accounts/Accountvardefs.php):

    PHP Code:
      'sic_code' =>
      array (
        
    'name' => 'sic_code',
        
    'vname' => 'LBL_SIC_CODE',
        
    'type' => 'varchar',
        
    'len' => 10,
        
    'comment' => 'SIC code of the account',

        
    'merge_filter' => 'enabled',

      ), 
    In this case, 'len' controls the size of the VARCHAR field created in the accounts table.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  3. #3
    BrianSteffens is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    15

    Default Re: Html input maxlength changes

    Great, thank you very much!

    Does that len variable also control the maxlength variable in the html tag that comes out when viewing a page?

  4. #4
    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: Html input maxlength changes

    Hi, BrianSteffens

    The maxlength is defined by the controller of the text field in the SugarCRM's MVC.

    So for modifying it you must create a customCode into the fields definition at the editviewdefs.php

    Cheers

    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    cel. 55 11 7636-5859
    e-mail: info@lampadacrm.com.br

  5. #5
    nbiondi is offline Sugar Community Member
    Join Date
    Dec 2007
    Posts
    35

    Default Re: Html input maxlength changes

    Ya that is one of the first problems we found using SugarCRM with a mysql cluster. We finally scrapped the whole project due the fact that the mysql cluster could not handle the obscene amount of joins that the crm seems to make. This made for extremely slowed performance at a level that would never work for any real production environement.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. No HTML email
    By rogersugarsugar in forum Help
    Replies: 6
    Last Post: 2007-07-25, 01:59 PM
  2. Replies: 5
    Last Post: 2007-06-16, 10:27 PM
  3. HTML in HTML mails
    By dirkv99 in forum Help
    Replies: 0
    Last Post: 2006-06-08, 08:28 AM
  4. Sugar Mail is SPAM! How to turn off HTML?
    By bjs3 in forum General Discussion
    Replies: 0
    Last Post: 2006-02-21, 03:03 PM
  5. HTML Email
    By mogiaco in forum Help
    Replies: 0
    Last Post: 2006-01-17, 12:00 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
  •