Page 1 of 2 12 LastLast
Results 1 to 10 of 13
Like Tree1Likes

Thread: Multi-Select Custom Field Width

  1. #1
    ashgreen is offline Member
    Join Date
    Apr 2009
    Posts
    8

    Default Multi-Select Custom Field Width

    Hello,

    I am using version 5.2.0a. I have created a list using the drop down editor. I have then added this list to Contacts, Notes, Emails using the Studio and selecting the multi-select option.

    The field is not wide enough and cuts off entries. The entries are of an average of 19 characters.

    • On the view screen it displays fine (just text).
    • On the edit screens I have set it to a single row, taking up the whole row. There doesn't seem to be an
      option to set its' width, and it doesn't take up the whole row. It's only about 10-12 characters wide.
    • On the Search screens there is an option to set the width %. I have set this to 50 but it does not seem to be having any impact. There doesn't seem to be a way to indicate "rows" on the search edit screens, so I'm not completely sure how the width is applied and am having difficulty determining this as it does not seem to be having any impact.


    Any help would be greatly appreciated.
    Regards,
    -Ashleigh

  2. #2
    ashgreen is offline Member
    Join Date
    Apr 2009
    Posts
    8

    Default Re: Multi-Select Custom Field Width

    Hey, I'm still struggling through with this issue.

    I have found I can increase the field height using custom>module>notes>metadata>*defs.php

    But there doesn't seem to be a way to modify the height. I have read about using the customCode property but my tests with that seem to indicate this property is completely ignored.

    Is there a way to progress or are multi-value fields limited in the width they can display at?

    Thanks,
    -Ashleigh

  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: Multi-Select Custom Field Width

    The width of the Multi Enum (Multi-Select) field is set on include/SugarFields/Fields/Multienum/*.tpl
    Unfortunately it is hardcoded here so you have 2 choices:
    1. Edit the core file according to your needs (non-upgrade safe);
    2. Copy the entire folder into a new one like Custommultienum, rename the php file and the class name, update the path to the templates on php script according to the new folder name, edit the templates to update it or even set a displayParams for that. Edit the editviewdefs.php and searchfields.php to update the type of the field.

    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
    ashgreen is offline Member
    Join Date
    Apr 2009
    Posts
    8

    Default Re: Multi-Select Custom Field Width

    Thanks,

    To start with I will implement the upgrade unsafe solution, and see how that goes.

    Cheers,
    -Ashleigh

  5. #5
    bickart68 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    111

    Default Re: Multi-Select Custom Field Width

    There is a simpler way to change the size of the Multi-Select.

    copy the modules/<module>/view/view.edit.php to custom/modules/<module>/view/view.edit.php

    After the line that says either
    echo $this->ev->display($this->showTitle);
    or
    parent::display();

    add some JavaScript to effect your screen element.

    echo '<script language="javascript"> try { document.getElementById(\'<your multi-select>[]\').style.width = \'200px\'; } catch (err) { alert (err);} </script>';

  6. #6
    Niggy is offline Sugar Community Member
    Join Date
    Oct 2008
    Posts
    246

    Default Re: Multi-Select Custom Field Width

    I have altered the file include/SugarFields/Fields/Multienum/SearchView.tpl to increase an enum width to 250px, but this has had no effect - is there something I'm missing?
    Nigel Evenden: Apache/2.2.11 (Debian) PHP/5.2.8 MySQL 5.1.30

    SalesAgility.com - SugarCRM Experts (UK)

    SugarCRM Bootcamp

    Get me a SugarCRM expert now!!

  7. #7
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default Re: Multi-Select Custom Field Width

    Quote Originally Posted by Niggy View Post
    I have altered the file include/SugarFields/Fields/Multienum/SearchView.tpl to increase an enum width to 250px, but this has had no effect - is there something I'm missing?
    same problem for me

  8. #8
    madmat is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    164

    Default Re: Multi-Select Custom Field Width

    Quote Originally Posted by bickart68 View Post
    copy the modules/<module>/view/view.edit.php to custom/modules/<module>/view/view.edit.php

    After the line that says either
    echo $this->ev->display($this->showTitle);
    or
    parent::display();

    add some JavaScript to effect your screen element.

    echo '<script language="javascript"> try { document.getElementById(\'<your multi-select>[]\').style.width = \'200px\'; } catch (err) { alert (err);} </script>';
    This works 100% if you change the folder name from "view" to "views".
    PHP Code:
    modules/<module>/views/view.edit.php to custom/modules/<module>/views/view.edit.php 
    thanks!

  9. #9
    Niggy is offline Sugar Community Member
    Join Date
    Oct 2008
    Posts
    246

    Default Re: Multi-Select Custom Field Width

    Yes, but I have the field in Advanced Search. How do I increase the width here? Thanks.
    Nigel Evenden: Apache/2.2.11 (Debian) PHP/5.2.8 MySQL 5.1.30

    SalesAgility.com - SugarCRM Experts (UK)

    SugarCRM Bootcamp

    Get me a SugarCRM expert now!!

  10. #10
    mrmmm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    71

    Default Re: Multi-Select Custom Field Width

    I am trying to change the width of a custom field on the Leads module, but the there is no modules/Leads/Views folder.

    Thank you.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 2009-02-19, 05:50 PM
  2. Soap multi-select field no longer editable in 5.0g
    By rog211 in forum Developer Help
    Replies: 5
    Last Post: 2009-02-10, 09:31 AM
  3. Replies: 0
    Last Post: 2008-10-15, 08:36 AM
  4. Replies: 2
    Last Post: 2008-05-15, 03:54 AM
  5. Multi select field
    By crazybeardedman in forum Help
    Replies: 1
    Last Post: 2008-02-14, 07:49 PM

Tags for this Thread

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
  •