Results 1 to 4 of 4

Thread: How to customize the width of textbox

  1. #1
    nongball is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    20

    Default How to customize the width of textbox

    How to customize the width of textbox?

    Can someone help me?

  2. #2
    clint's Avatar
    clint is offline SugarCRM CTO & Co-founder
    Join Date
    Aug 2004
    Location
    Silicon Valley
    Posts
    2,122

    Default Re: How to customize the width of textbox

    It requires manually editing the editviewdefs.php file.

    Example:
    1) Create a new custom TextArea field in the Opportunities module.
    2) Add the custom field to the EditView and the DetailView layouts by adding a new row to the bottom of the layouts and then dropping the field onto the screen. NOTE: Be sure to remove the second filler field from the new row you added so that the new custom field will span across the two columns.
    3) Save and deploy the changes to both layouts.
    4) Now open in a text editor the new file custom/modules/Opportunities/metadata/editviewdefs.php.
    5) Find the Comments field definition and modify it to include the new displayParams parameter below:
    PHP Code:
     array (
         
    'name' => 'comments_c',
         
    'label' => 'LBL_COMMENTS',
         
    'displayParams'=>array('rows'=>20'cols'=>80'maxlength'=>350),
      ), 
    Sugar Developer Zone - developer resources | Sugar University - user and admin training
    Sugar Docs - user and admin documentation |
    Sugar Bug Tracker - Enter or view bugs
    SugarForge- open source modules, themes, lang packs | SugarExchange - commercial extensions

    Clint Oram
    Chief Technology Officer and Co-founder
    SugarCRM

  3. #3
    nongball is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    20

    Default Re: How to customize the width of textbox

    I want to decrease the width of the textfield in the searchform area (not custom field)

  4. #4
    clint's Avatar
    clint is offline SugarCRM CTO & Co-founder
    Join Date
    Aug 2004
    Location
    Silicon Valley
    Posts
    2,122

    Default Re: How to customize the width of textbox

    Same basic idea. Modify the searchdefs.php file and add in this parameter to the definition of the field whose size you want to change.
    'displayParams'=>array('size'=>10,),
    Sugar Developer Zone - developer resources | Sugar University - user and admin training
    Sugar Docs - user and admin documentation |
    Sugar Bug Tracker - Enter or view bugs
    SugarForge- open source modules, themes, lang packs | SugarExchange - commercial extensions

    Clint Oram
    Chief Technology Officer and Co-founder
    SugarCRM

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 2008-06-03, 03:31 PM
  2. Reached Table Width Max (Holy Cow!)
    By reayling in forum Developer Help
    Replies: 1
    Last Post: 2007-11-28, 11:22 AM
  3. Page width considerations
    By dspake in forum Help
    Replies: 0
    Last Post: 2005-01-28, 03:38 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
  •