Results 1 to 6 of 6

Thread: How to change the default dropdown value

  1. #1
    rustinp77 is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Mid-Atlantic, US
    Posts
    178

    Default How to change the default dropdown value

    Hi Guys/Gals,

    I've searched up and down however I couldn't find an answer to the problem I'm having...

    I have created a module through builder and studio that makes use of a few drop-downs. Everything works very nicely however at the time of development, I was not aware of the drop-down values or the default value. The problem I am having is editing/changing the default drop-down value. Where can this be done?

    Regards,

    Rustin Phares

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: How to change the default dropdown value

    Admin->Studio->Edit Dropdowns

    I'm not sure but the default value may just be the first item in the list so move your desired default to the top. Screws up ordering if you want it to remain in a certain order though

  3. #3
    rustinp77 is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Mid-Atlantic, US
    Posts
    178

    Default Re: How to change the default dropdown value

    Quote Originally Posted by eggsurplus
    Admin->Studio->Edit Dropdowns

    I'm not sure but the default value may just be the first item in the list so move your desired default to the top. Screws up ordering if you want it to remain in a certain order though
    Ya... I've already given that a try and a few different ways. I remember studio asked me what I wanted for the default value which you would think would be stored to the vardefs but, I have no clue.

    Regards,

    Rustin

  4. #4
    mapm's Avatar
    mapm is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Portugal
    Posts
    239

    Default Re: How to change the default dropdown value

    Search for: $app_list_strings['DROP_DOWN_NAME_default_key'])
    It will apear in editview.php for replacemente and in one of this files(I think):
    - custom/application/Ext/Language/en_us.lang.ext.php
    - custom/Extension/application/Ext/Language/en_us.MODULE_NAME.php
    - include/language/en_us.lang.php

  5. #5
    rustinp77 is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Mid-Atlantic, US
    Posts
    178

    Default Re: How to change the default dropdown value

    Quote Originally Posted by mapm
    Search for: $app_list_strings['DROP_DOWN_NAME_default_key'])
    It will apear in editview.php for replacemente and in one of this files(I think):
    - custom/application/Ext/Language/en_us.lang.ext.php
    - custom/Extension/application/Ext/Language/en_us.MODULE_NAME.php
    - include/language/en_us.lang.php
    Ya... I saw that reference in EditView but, could never locate the $app_list_string['product_category_options_default_key'] anywhere. I believe I left the default value empty when I was building these... The funny thing is, it keeps defaulting to the value of 0 which is now started to make more sense.

    You got me thinking... I'll try adding the default_key string and see what happens. I've been sitting with these modules completed for the past week, just couldn't find this wrinkle.

    Regards,

    Rustin

  6. #6
    rustinp77 is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Mid-Atlantic, US
    Posts
    178

    Default Re: How to change the default dropdown value

    PHP Code:
    $app_list_strings['product_category_options']= array (
      
    '' => '',
      
    => 'All',
      
    => 'None',
    );

    $app_list_strings['product_category_options_default_key'] = 1

    Thanks...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Add/Modify DB
    By russel2x2 in forum Developer Help
    Replies: 4
    Last Post: 2007-12-11, 10:19 AM
  2. Replies: 3
    Last Post: 2006-10-18, 12:47 AM
  3. SugarCrm 4.0 Patch
    By mgamboa in forum General Discussion
    Replies: 0
    Last Post: 2005-12-21, 04:14 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
  •