Results 1 to 3 of 3

Thread: How do I change a field to "list box" ?

  1. #1
    endrejob is offline Junior Member
    Join Date
    Aug 2008
    Posts
    3

    Default How do I change a field to "list box" ?

    When I add a field to a form it is not functioning properly. It seems to filter incorrectly when using fieds that I add to a form.

    For example adding "Assigned to" field to the "Advance Search" form of the bug tracker will produce this problem but any other field that you add also has the same issue.

    You do the following:
    Admin -> Studio -> Bug Tracker -> Layout -> Search -> Advance Search ->
    -> Pull the "Assigned to" field from hidden to Default -> Press "Save and Deploy" ->
    -> Clisk on "Bug Tracker" tab -> Advance Search ->
    -> Click on the Search button next to the "Assigned to" field -> Select one of the users ->
    -> after pressing "Search" it is not finding the proper records

    The problem may be that these fieds are added not as List Boxes but as "type in" single line fields which do not return the values correctly.

    Question: How can I change the display of these fields to the usual "scrollable boxes" instead of the single line field?

    Please let me know if you know the answer. I have spent many hours trying to find a solution.
    Thanks your for your help,
    Endre

  2. #2
    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: How do I change a field to "list box" ?

    Hi Endre

    It is so weird because by default the assigned user is in the Advanced Search as a multiselect field, but anyway:
    Edit the file: custom/modules/Bugs/metadata/searchdefs.php

    And add this field into advanced_search array:

    PHP Code:
                                array('name' => 'assigned_user_id''type' => 'enum''label' => 'LBL_ASSIGNED_TO''function' => array('name' => 'get_user_array''params' => array(false))), 
    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.

  3. #3
    endrejob is offline Junior Member
    Join Date
    Aug 2008
    Posts
    3

    Default Re: How do I change a field to "list box" ?

    Thanks Andre,
    You sound amazingly knowledgeable.

    I will give it a try and let you know it it worked. Hopefully someone will also fix it in the original source code as well so others do not need to go through this trouble.

    Thanks again,
    Endre

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 19
    Last Post: 2011-04-22, 09:24 PM
  2. Is it a bug? Change the type of a custom field
    By ToniFatec in forum Developer Help
    Replies: 0
    Last Post: 2008-05-06, 03:17 PM
  3. Replies: 1
    Last Post: 2007-05-01, 05:34 PM
  4. Replies: 0
    Last Post: 2006-02-15, 08:31 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
  •