CRM Open Source Business & Social CRM Software

Results 1 to 7 of 7

Thread: Hide subpanels

  1. #1
    kasperd is offline Senior Member
    Join Date
    Nov 2008
    Posts
    38

    Default Hide subpanels

    I found tutorial how to hide panels however it doesnt work maybe becuase me and some other guys dont knot where to paste below code


    I also copied all as in tutorial and nothing happens no erros but nothing happens

    Probably i do not know where to paste the code exactly :

    'javascript' => 'onchange="togglePanel(this);"',


    In what part of ediviewdefs?
    Reply With Quote

  2. #2
    dlorenzetti's Avatar
    dlorenzetti is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    São Paulo, Brasil
    Posts
    189

    Default Re: Hide subpanels

    Hello kasperd,

    If your field is a dropdown you can do this way:

    for example if your field called "my_field", in editviewdefs.php

    PHP Code:
    array(
      
    'name' => 'my_field',
      
    'label' => 'LBL_MY_FIELD',
      
    'displayParams' => array(
            
    'javascript' => 'onchange="togglePanel(this);"',
      ),  
    ), 
    remember that if you is not using your system as developer mode you need to run "Quick Repair and Rebuild"
    Diego Lorenzetti
    Lampada Global Services - Open Source Solutions
    Phone: +55 11 3237-3110
    Email: equipe@lampadaglobal.com
    Site: www.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.

  3. #3
    kasperd is offline Senior Member
    Join Date
    Nov 2008
    Posts
    38

    Default Re: Hide subpanels

    thank You now it works i think it was rebuild issue.

    i have another question if iwant more dropdownfields than one to have influence on showing the panels

    so i have to add another array into toggle_panel_ fieldsdefs?



    thx for help

  4. #4
    dlorenzetti's Avatar
    dlorenzetti is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    São Paulo, Brasil
    Posts
    189

    Default Re: Hide subpanels

    Hello,

    Exactlly, if you want more dropdowns is just add into toggle_panel_ fieldsdefs.
    Diego Lorenzetti
    Lampada Global Services - Open Source Solutions
    Phone: +55 11 3237-3110
    Email: equipe@lampadaglobal.com
    Site: www.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.

  5. #5
    kasperd is offline Senior Member
    Join Date
    Nov 2008
    Posts
    38

    Default Re: Hide subpanels

    Everything works fine but i noticed small irritating thing that if there is default value in dropdown and some panels should be hidden from begining i have to change the value and back to the default to have those subpanels hidden. They are not hidden from begining

  6. #6
    kasperd is offline Senior Member
    Join Date
    Nov 2008
    Posts
    38

    Default Re: Hide subpanels

    How to make those panels hidden from the begining of entering into create view. the value in dropdown is default but i have to make select it one more time to hide panels


    KNOW THE ANSWER we need to add javascript code onload to hide panels on loding the create view and use the field name:

    'templateMeta' =>
    array (
    'javascript' => '<script type="text/javascript"> onload=togglePanel(informacje_c); </script>',
    'form' =>
    array (............................
    Last edited by kasperd; 2009-03-25 at 09:19 AM. Reason: know the answer

  7. #7
    Nuel's Avatar
    Nuel is offline Senior Member
    Join Date
    Apr 2009
    Posts
    30

    Default Re: Hide subpanels

    Hi I'm Nuel

    I am having the same challenege you were having earlier on

    I studied the tutorial on Dynamic Panel by Kaz and Josh tried out the thing but it doesnt work.

    I dont know what to do. I am on developper's mode and its still not just working

    I'ld like you to please help me out.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to hide subpanels from the DetailView of Modules?
    By ingo.jaeckel in forum Developer Help
    Replies: 4
    Last Post: 2008-06-26, 12:52 PM
  2. How to hide subpanels
    By Mubi in forum Developer Help
    Replies: 3
    Last Post: 2008-06-26, 12:52 PM
  3. Replies: 20
    Last Post: 2008-04-24, 11:35 AM
  4. Replies: 2
    Last Post: 2008-04-19, 01:16 AM
  5. Hide subpanels as default
    By trilogexpert in forum Help
    Replies: 0
    Last Post: 2006-03-02, 02:15 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
  •