Results 1 to 4 of 4

Thread: change field values by changing the dropdown option

  1. #1
    prasannagowri is offline Senior Member
    Join Date
    Apr 2009
    Posts
    52

    Default change field values by changing the dropdown option

    hello
    I have a drop down in accounts module showing the clinic names if i select a clinic
    i have to show the clinic information below.
    ex:clinic Address:
    Clinic Phone Number:
    please guide me your help is appreciated
    thanks in advance

  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: change field values by changing the dropdown option

    You need to create a ajax based javascript to get the clinic information onchange the dropdown.
    Another suggestion is to use a default relate field for clinic and this attribute like that into the field defs:

    PHP Code:
                'displayParams' =>
                array (
                  
    'additionalFields' => array(
                    
    'website' => 'website',
                    
    'phone_office' => 'phone_office',
                    
    'phone_fax' => 'phone_fax',
                    
    'phone_alternate' => 'phone_alternate',
                    
    'employees' => 'employees',
                    
    'annual_revenue' => 'annual_revenue',
                    
    'industry' => 'industry',
                    
    'account_type' => 'account_type',
                  ),
                ), 
    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
    prasannagowri is offline Senior Member
    Join Date
    Apr 2009
    Posts
    52

    Default Re: change field values by changing the dropdown option

    hello,
    thanks for quick replay,
    as u said i created the separate php file by using ajax based javascript

    this is my custom code:

    $query = "select id,name_of_company,first_name from a234_clinics where id='$id'";
    $res = $db -> query($query);
    $row = $db -> fetchByAssoc($res);

    and i am getting following error:
    Fatal error: Call to a member function query() on a non-object in /opt/lampp/htdocs/sugar51/modules/Contacts/.................... on line 298

    please help me to resolve this issue,
    thanks in advance.

  4. #4
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: change field values by changing the dropdown option

    Add global $db; to the code.

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: 2009-02-23, 12:45 PM
  2. Replies: 2
    Last Post: 2009-01-23, 09:50 PM
  3. How to change dropdown field into multiselect?
    By andreasbalzer in forum Help
    Replies: 2
    Last Post: 2008-10-15, 10:14 PM
  4. Replies: 5
    Last Post: 2008-07-01, 09:45 PM
  5. How to change DB values for this DropDown
    By fai.hans in forum Help
    Replies: 2
    Last Post: 2008-04-03, 10:25 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
  •