Results 1 to 4 of 4

Thread: custom popup

  1. #1
    midjinou is offline Senior Member
    Join Date
    May 2009
    Posts
    26

    Default custom popup

    hello, I would like to create a custom popup in module "case", different from that which existed there already and I want to use both. Does anyone know how he does it work?

  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: custom popup

    You need to copy the folder include/SugarFields/Fields/Relate to another folder, rename both php script and class name, update the path to templates on php script and modify the EditView.tpl this way:

    HTML Code:
    <input type="button" name="btn_{{sugarvar key='name'}}" tabindex="{{$tabindex}}" title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" class="button" value="{$APP.LBL_SELECT_BUTTON_LABEL}" onclick='open_popup("{{sugarvar key='module'}}", 600, 400, "", true, false, {{$displayParams.popupData}}, "single", true, "<your_popup_here>");'>
    {{if empty($displayParams.selectOnly) }}
    Replace the <your_popup_here> by some new popup defs.
    Copy the file modules/<PopupModule>/metadata/popupdefs.php to the same name in the onclick function call.
    Modify the enough to get it working.
    Edit the editviewdefs.php of the module containing the relate field and set the attribute type:
    PHP Code:
    'type' => 'new_field_def'
    Where 'new_field_def' is the folder name you had customized as specified above.

    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
    jgyc430 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    19

    Default Re: custom popup

    Hi,

    This may not be related to the above matter but i have the following problem.

    I created a custom module called “Product”. There is a default “name” field but I have omitted it from the editview, detailview and listview layouts.

    Everything works fine except when comes to building a relationship with stock module “Opportunities”. I have created a 1-1 relationship for both modules. But when comes to selecting a product in Opportunities module it does not show up in the relate field.

    I have tried to enable a URL link in one of my customized field “main_product” by setting

    'link' => true

    It still does not work. I am guessing the relationship could only call the default field of the child module. I want to enable calling for customized field. Please help!

  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: custom popup

    Quote Originally Posted by jgyc430 View Post
    Hi,

    This may not be related to the above matter but i have the following problem.

    I created a custom module called “Product”. There is a default “name” field but I have omitted it from the editview, detailview and listview layouts.

    Everything works fine except when comes to building a relationship with stock module “Opportunities”. I have created a 1-1 relationship for both modules. But when comes to selecting a product in Opportunities module it does not show up in the relate field.

    I have tried to enable a URL link in one of my customized field “main_product” by setting

    'link' => true

    It still does not work. I am guessing the relationship could only call the default field of the child module. I want to enable calling for customized field. Please help!

    You need to implement the save function into your custom module class to fill in field name some unique identifier value.

    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)

Similar Threads

  1. Custom Popup Filter
    By hubcrm in forum Developer Help
    Replies: 12
    Last Post: 2009-08-14, 12:42 PM
  2. Custom popup problem
    By flymirco in forum Developer Help
    Replies: 2
    Last Post: 2009-04-22, 09:21 AM
  3. Help with custom popup
    By madhrishi in forum Developer Help
    Replies: 2
    Last Post: 2009-02-02, 11:00 AM
  4. custom field and popup
    By guvencacarkan in forum Developer Help
    Replies: 0
    Last Post: 2007-07-27, 03:19 AM
  5. dev Custom, parametres Popup
    By ensiate in forum Français
    Replies: 0
    Last Post: 2006-05-15, 10:35 AM

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
  •