Results 1 to 2 of 2

Thread: pop up? how

  1. #1
    Meyer is offline Sugar Community Member
    Join Date
    Oct 2006
    Location
    south africa
    Posts
    646

    Default pop up? how

    hi there

    As i said previously i am not a programmer but an administrator. baby steps please.

    I need a pop up to appear when someone chose a tick box in accounts.

    for example. i i have a tickbox called. active software client and the pesron changed the value to active-'1'
    i want a pop up to appear saying - remember to choose what software packages under the software module'

    regards

    Paul

  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: pop up? how

    Hi Paul

    Do the following:
    1. Unzip the attached archive into include/SugarFields/Fields/ folder;
    2. Change permission for this folder: chown -R <the_user>.<the_group> include/SugarFields/Fields/Booljavascript, where <the_user>.<the_group> are the user and group used by apache when getting started;
    3. Edit the custom/modules/Accounts/metadata/editviewdefs.php and look for the field you are going to link with the popup;
    4. Add the following code in the field definition:

    PHP Code:
      'displayParams' => array(
        
    'javascript' => 'onchange="showPopup(this);"',
      ), 
    5. Have a look in the array('file'=>'modules/Accounts/Account.js'), inside the same file, add a new line just like: array('file'=>'custom/modules/Accounts/Account.js'),
    6. Create such file and add into it the function showPopup(field) containing a code like that:

    Code:
    if(field.checked) {
      alert("remember to choose what software packages under the software module");
    }
    Cheers
    Attached Files Attached Files
    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
  •