Results 1 to 3 of 3

Thread: [Dropdowns] How to populate dynamically?

  1. #1
    andy60 is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Rome
    Posts
    59

    Default [Dropdowns] How to populate dynamically?

    I am a financial planner and i have a great portfolio of products. My solution for archiving operations is to add a dropdown field to module Calendar. But my dropdown must read data from a mysqltable. I prefer it, i have several products. My question is: how to populate dynamically a dropdown box? i have problems to understand it. I have the bokk for SugarCrm Developers but unfortunately i don't see this importanta aspect.
    Last edited by andy60; 2007-09-10 at 07:08 AM.
    Andy60
    Linuxforce

  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: [Dropdowns] How to populate dynamically?

    Hi, andy60.

    You can implement it by ajax.

    I believe the dropdown must be filled after some value were selected into another dropdown. This way you will:
    1. Create a php file into root of sugar whose receive by GET the desired parameters and echo the content of dropdown as a json variable;
    2. Create a javascript that calls this php function and populate the dropdown through the json variable;
    3. Include this js file into header of EditView, together other js including
    4. Define an event at this dropdown onchange="javascript_function_name(parameters)"


    Cheers

    André Lopes
    Lâmpada Global Services
    Av. Angelica, 1814 cj. 1502
    São Paulo, SP 01228-200
    tel1. 55 11 3668-6776
    tel2. 55 11 3822-2581
    cel. 55 11 7636-5859
    e-mail: info@lampadacrm.com.br

  3. #3
    andy60 is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Rome
    Posts
    59

    Default Re: [Dropdowns] How to populate dynamically?

    Thank you for your attention. Sincerely.
    Andy60
    Linuxforce

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. dynamically selecting drop downs
    By ramiz in forum General Discussion
    Replies: 1
    Last Post: 2007-04-25, 10:50 AM
  2. Replies: 2
    Last Post: 2006-08-09, 11:20 AM
  3. Create new users dynamically
    By Tom79 in forum Help
    Replies: 4
    Last Post: 2006-07-03, 11:35 AM
  4. Populate Combo using Ajax
    By abhi in forum Developer Help
    Replies: 1
    Last Post: 2006-04-14, 12:12 AM
  5. User logged out when IP dynamically changed
    By MMorgan in forum General Discussion
    Replies: 2
    Last Post: 2005-11-04, 06: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
  •