Results 1 to 3 of 3

Thread: Restore grouped address fields in DetailView?

  1. #1
    madmat is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    164

    Red face Restore grouped address fields in DetailView?

    Hi folks,

    question:
    After editing the accounts DetailView in studio the grouped address fields for shipping and billing address were gone.
    Instead the postal code, street & city fields appeared separatly in the field list.
    First I didnīt worry about it and simply placed them instead, but:

    With the grouped fields the "Copy..." to contacts button was gone too.

    2 options:
    a) Restore the grouped address field
    b) Re-add the button for the non-grouped fields.

    Too bad I dont know how to achieve any of those - so Iīd be very glad for any kind of advice.

    Sugar 5.2l

    Thank you!

  2. #2
    madmat is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    164

    Default Re: Restore grouped address fields in DetailView?

    Hereīs what Iīve tried so far for option b.
    In custom/modules/accounts/metadata/detailviewdefs.php:
    Just below the shipping/billing address fields:

    PHP Code:
        4 => 
            array (
              
    => 
              array (
                
    'customCode'=>'<input class="button" title="' $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . 
                                     
    '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name='.$this->bean->name.'&html=change_address' .
                                     
    '&primary_address_street=' str_replace(array("\rn""\r""\n"), array('','','<br>'), urlencode($this->bean->billing_address_street)) . 
                                     
    '&primary_address_city=' $this->bean->billing_address_city 
                                     
    '&primary_address_state=' $this->bean->billing_address_state 
                                     
    '&primary_address_postalcode=' $this->bean->billing_address_postalcode 
                                     
    '&primary_address_country=' $this->bean->billing_address_country .
                                     
    '", true, false);\' value="' $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE']. '">'
                
    'label' => 'Copy',
              ),
              
    => 
              array (
              
    //to be done
              
    ),
            ), 
    This gives me a button that opens the desired popup for contacts, but it shows all contacts available.
    All parameters ('account_name') are empty.

    What did I forget to do?
    Last edited by madmat; 2011-03-04 at 02:51 PM. Reason: typo

  3. #3
    madmat is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    164

    Default Re: Restore grouped address fields in DetailView?

    goddam captcha!!!! hate.it.

    btt:
    PHP Code:
    array (
                
    'customCode'=>'<input class="button" title="' $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . 
                                     
    '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name='.'{$fields.name.value}'.'&html=change_address' .
                                     
    '&primary_address_street=' .'{$fields.billing_address_street.value}'
                                     
    '&primary_address_city=' .'{$fields.billing_address_city.value}'
                                     
    '&primary_address_state=' .'{$fields.billing_address_state.value}'
                                     
    '&primary_address_postalcode=' .'{$fields.billing_address_postalcode.value}'
                                     
    '&primary_address_country=' .'{$fields.billing_address_country.value}'.
                                     
    '", true, false);\' value="Copy">'
                
                
    'label' => 'Copy to contacts',
              ), 
    did the trick.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 2011-10-24, 01:35 PM
  2. Filling 'fields' in detailview
    By JVWay in forum Developer Help
    Replies: 0
    Last Post: 2009-09-02, 05:38 PM
  3. hidding fields detailview
    By gugachiu in forum Developer Help
    Replies: 0
    Last Post: 2008-07-03, 07:30 PM
  4. EditView fields in DetailView
    By joel.oliveira in forum Help
    Replies: 3
    Last Post: 2008-01-29, 05:18 PM
  5. Restore deleted fields???
    By Dawson78 in forum Help
    Replies: 3
    Last Post: 2006-12-18, 10:32 AM

Tags for this Thread

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
  •