Results 1 to 5 of 5

Thread: HOW TO change dropdown by Search function?

  1. #1
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default HOW TO change dropdown by Search function?

    Hi,

    I have the following question;

    I created a new module called 'Planning" with some new fields.
    When i go to the overview you can search for existing data;

    The datatype of these created fields is dropdown.

    Now i want the overview to just let me see an standard empty field, and that i can choose a data for search from the dropdown box.
    See screenshot.

    Can someone tell me how to change this?

    Thanks, Much appreciate
    Attached Images Attached Images  
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  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 TO change dropdown by Search function?

    Hi Jordy

    You need to add the attribute

    PHP Code:
    'displayParams' => array(
      
    'size' => '1',
    ), 
    On field defs at custom/modules/<YourModule>/metadata/searchdefs.php

    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
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: HOW TO change dropdown by Search function?

    Quote Originally Posted by andopes View Post
    Hi Jordy

    You need to add the attribute

    PHP Code:
    'displayParams' => array(
      
    'size' => '1',
    ), 
    On field defs at custom/modules/<YourModule>/metadata/searchdefs.php

    Cheers

    Hi Andopes,

    Thx for your reply.
    There is no such map and file in this directory;

    custom/modules/Plan_Planning_Projecten/metadata/searchdefs.php

    I had already deployed this module so I can find this file in;

    modules/Plan_Planning_Projecten/metadata

    Php code;
    PHP Code:
    <?php
    $module_name 
    'Plan_Planning_Projecten';
    $searchdefs [$module_name] = 
    array (
      
    'layout' => 
      array (
        
    'basic_search' => 
        array (
          
    'planning_month' => 
          array (
            
    'width' => '10%',
            
    'label' => 'LBL_PLANNING_MONTH',
            
    'default' => true,
            
    'name' => 'planning_month',
          ),
          
    'planning_year' => 
          array (
            
    'width' => '10%',
            
    'label' => 'LBL_PLANNING_YEAR',
            
    'default' => true,
            
    'name' => 'planning_year',
          ),
        ),
        
    'advanced_search' => 
        array (
          
    'planning_month' => 
          array (
            
    'width' => '10%',
            
    'label' => 'LBL_PLANNING_MONTH',
            
    'default' => true,
            
    'name' => 'planning_month',
          ),
          
    'planning_year' => 
          array (
            
    'width' => '10%',
            
    'label' => 'LBL_PLANNING_YEAR',
            
    'default' => true,
            
    'name' => 'planning_year',
          ),
          
    'planning_sort' => 
          array (
            
    'width' => '10%',
            
    'label' => 'LBL_PLANNING_SORT',
            
    'default' => true,
            
    'name' => 'planning_sort',
          ),
        ),
      ),
      
    'templateMeta' => 
      array (
        
    'maxColumns' => '3',
        
    'widths' => 
        array (
          
    'label' => '10',
          
    'field' => '30',
        ),
      ),
    );
    ?>
    Do i need to modify this file? And where will i have to add this code;

    'displayParams' => array(
    'size' => '1',
    )

    Hope you can help me.
    Thanxxxx
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  4. #4
    zaska's Avatar
    zaska is offline Senior Member
    Join Date
    Sep 2008
    Posts
    99

    Default Re: HOW TO change dropdown by Search function?

    Copy the file to the custom directory and modify it there.
    PHP Code:
        'advanced_search' =>  
        array ( 
          
    'planning_month' =>  
          array ( 
            
    'width' => '10%'
            
    'label' => 'LBL_PLANNING_MONTH'
            
    'default' => true
            
    'name' => 'planning_month'
            
    'displayParams' => array( 
              
    'size' => '1'
            ), 
          ), 

  5. #5
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: HOW TO change dropdown by Search function?

    Thanks a lot guys, it worked!

    Much Appreciate
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

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-01-23, 09:50 PM
  2. How to change DB values for this DropDown
    By fai.hans in forum Help
    Replies: 2
    Last Post: 2008-04-03, 10:25 PM
  3. massupdate : change function
    By holdjul in forum Help
    Replies: 1
    Last Post: 2007-07-27, 08:11 AM
  4. Replies: 2
    Last Post: 2006-05-06, 01:24 AM
  5. Replies: 3
    Last Post: 2005-08-15, 02:28 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
  •