Results 1 to 4 of 4

Thread: Default value and alphabetizing drop downs

  1. #1
    Mike220474 is offline Sugar Community Member
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    43

    Question Default value and alphabetizing drop downs

    Is there a way using studio or another admin GUI, to set the default value of a dropdown?
    I found in the wiki how to do it, but access to the server is not allowed for the admin of the SugarCRM within my ocmpany.(http://www.sugarcrm.com/wiki/index.p...Default_Values)

    Also when I add a value to a dropdown, is there a way to have any or a specific dropdown automatically show it in alphabetical order?
    Right now im moving each and every dropdown value by hand, and when a dropdown has, say 100 items, its a lot of work, since it appears impossible to insert an item in between 2 values.

    Thanks your help is appreciated.
    Last edited by Mike220474; 2008-08-13 at 01:14 PM.
    -------------------------------------------------------------------------------------
    May I ask you two questions?
    Sure what question is left?

  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: Default value and alphabetizing drop downs

    Hi Mike.

    To automatically show the dropdowns in alphabetical order you have to modify core files. Do you want to do that?
    You have to modify the function "return_app_list_strings_language" in the file include/utils.php

    Before return the $app_list_strings you have to check which element is a dropdown (array) and sort it.

    To define a default value just set the attribute 'default' => 'default_value' in the field definition.

    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
    Mike220474 is offline Sugar Community Member
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    43

    Default Re: Default value and alphabetizing drop downs

    thanks, but where do I find the default field definition of the drop down editor?
    Or is it located in another part of studio?

    For example, when I edit a dropdown I can see:



    But it does not show the default field definition
    -------------------------------------------------------------------------------------
    May I ask you two questions?
    Sure what question is left?

  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: Default value and alphabetizing drop downs

    Hi Mike

    Studio allows define the default dropdown value only for fields been created.
    Once created you have to create an extended vardefs to define it.

    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.

Thread Information

Users Browsing this Thread

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

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
  •