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

Thread: How to replace "State" TextBox with DropDown

  1. #1
    RADIX is offline Member
    Join Date
    Jul 2010
    Posts
    12

    Default How to replace "State" TextBox with DropDown

    Hi

    We've just had SugarCE-5.5.0 installed in our company and we want to customize it according to our needs.

    I want to replace State's TextBox with a State DropDown.
    I already created a State DropDown using DropDown Editor, but I couldn't find out the way to replace the State TextBox with that DropDown.

    I found some similar threads while googling, but they don't seem to talk about the same Sugar version we have here.
    Hence, files and folders structure isn't the same when talking about going through files and paths to modify code.

    Any help would be appreciated,
    Thank you in advance.
    Last edited by RADIX; 2010-08-31 at 12:31 PM. Reason: Syntax error

  2. #2
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: How to replace "State" TextBox with DropDown

    Hello,

    If you have address block and you want to use dropdown for state field, you have to break address block and then you can use customCode to replace state text field.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  3. #3
    RADIX is offline Member
    Join Date
    Jul 2010
    Posts
    12

    Default Re: How to replace "State" TextBox with DropDown

    Hi david,

    Thank you for considering my thread.

    you have to break address block and then you can use customCode to replace state text field
    Can you please go through more details?

    Thanks

  4. #4
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: How to replace "State" TextBox with DropDown

    Hello,

    By breaking the address block I meant, you have first drop/remove the address block from edit view using studio.

    Then you will no longer able to get them back from studio.

    Then you have to place street, city, state, country fields separately and then you can change state textfield into drop down.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  5. #5
    RADIX is offline Member
    Join Date
    Jul 2010
    Posts
    12

    Default Re: How to replace "State" TextBox with DropDown

    Thank you david for your reply,

    I think I can try what you suggested. But we already have many contacts in Sugar database and therefore I think we might lose address data of these contacts if I remove the original address fields and replace them with custom fields.
    In this case, how can I copy the contents of the address fields (which exist originally), into the new address fields (which I need to create), without having to repeat this procedure manually for each contact?

    Thank you.

  6. #6
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: How to replace "State" TextBox with DropDown

    Hello,

    I never meant remove field from database. I meant remove from editiview through studio and and place broken block's fields one by one using studio.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  7. #7
    RADIX is offline Member
    Join Date
    Jul 2010
    Posts
    12

    Default Re: How to replace "State" TextBox with DropDown

    Hi,

    Yes I got what you meant, you said I have to go to :
    Studio -> Contacts -> Layout -> EditView
    But here, I only can see two blocks :
    "Primary Address Street" and "Alternate Address Street"
    While actually, each block of them displays the following fields to the user :
    "Primary Address"
    "City"
    "State"
    "Postal Code"
    "Country"

    So, I guess if I remove "Primary Address Street" and "Alternate Address Street", all those fields will be removed, then I can replace them with the following fields in Studio->editview :

    "My customized Primary Address Street New Field"
    "Primary Address City"
    "My Primary Address State DropDown"
    "Primary Address Postal Code"
    "Primary Address Country"

    But this way, user won't be able to see the old content of both "Primary Address Street" and "Primary Address State" original fields that I replaced. Am I wrong?

    How can I get to link both of the new fields with the DataBase fields that were linked to "Primary Address" and "State" original fields?

    Thanks.
    Last edited by RADIX; 2010-09-02 at 11:41 AM. Reason: Explain further

  8. #8
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: How to replace "State" TextBox with DropDown

    Hello,

    When you remove something from Studio -> Contacts -> Layout -> EditView, it wont remove the field from database. It will simply remove field from edit view. So you will have all those 5 fields in available fields list to place again.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  9. #9
    RADIX is offline Member
    Join Date
    Jul 2010
    Posts
    12

    Default Re: How to replace "State" TextBox with DropDown

    Hi,

    When you remove something from Studio -> Contacts -> Layout -> EditView, it wont remove the field from database
    Sure it won't, I didn't say the contrary.

    But new fields I will create and add in EditView won't automatically gain links to the DB fields of the old removed fields (of EditView). I need to create their links manually.

    I don't know if I was clear.

    I can explain further if necessary

    Many thanks

  10. #10
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: How to replace "State" TextBox with DropDown

    Hello,

    Why do you want to create new custom fields while You can use the default fields?
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

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. Replace "Powered by SugarCRM logo" with text?
    By skuliaxe in forum Developer Help
    Replies: 2
    Last Post: 2011-07-05, 06:35 PM
  2. replace state textbox with dropdown while creating contact
    By velocity00723 in forum Developer Help
    Replies: 9
    Last Post: 2009-02-25, 10:05 AM
  3. Convert "State" field to dropdown
    By nicholak in forum Help
    Replies: 0
    Last Post: 2008-07-18, 01:02 AM
  4. "Please replace the SugarCRM logos"
    By greenleaf108 in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2007-03-07, 10:32 PM
  5. Replace "Task List" with Accounts/ListView
    By tj@estreet.com in forum Help
    Replies: 3
    Last Post: 2006-03-13, 01:45 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
  •