Results 1 to 9 of 9

Thread: Show fields depending on a dropdown value

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

    Default Show fields depending on a dropdown value

    Wonder if you can help me.

    i have a dropdown with 2 values in accounts

    customer and supplier.

    i have about 20 fields.

    but certain field should only show whem customer is chosen from dropdown, and other field must be shown when supplier is shown

    can this be done

  2. #2
    dmetelski is offline Senior Member
    Join Date
    Jul 2010
    Posts
    38

    Default Re: Show fields depending on a dropdown value

    The Developer Toolkit add module in SugarForge can do this.

  3. #3
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Show fields depending on a dropdown value

    Hi,

    I would suggest use different panels to make the fields separate and show/hide panels using javascript.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

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

    Default Re: Show fields depending on a dropdown value

    Hi there.

    I forgot to say, this is still 4.5.3.

    Regards

    Paul

  5. #5
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Show fields depending on a dropdown value

    Hi,

    As you are using 4.5.3, you can modify your EditView.html and separate the fields in a div to show/hide using javascript.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

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

    Default Re: Show fields depending on a dropdown value

    HUH? Sorry, your words were like rockets flying past me. I am not a programmer but a simple administrator.
    Please explain more.

    Regards

    Paul

  7. #7
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Show fields depending on a dropdown value

    Hi,

    Cannot write down the code here, and as you are not a programmer my guidelines will go pass over again. Either provide the EditView.html & EditView.php of concerned module here or email me @ davidboris@live.com
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  8. #8
    jlabuelo is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    426

    Default Re: Show fields depending on a dropdown value

    Hi David

    I am trying to get the same it is explained in this post. I have created a new custom module and divided the fields in panels. One of the fields is a dropdown field that has values "Positive/Negative". Then I have a list of 5 CheckBox fields that only should be visible if the dropdown value is Negative. (It would be greate if this could be done as soon as the value in the dropdown field changes, with no need to save the record once the dropdown field changes and then reopen the record)

    Could you explain me how to do this with JavaScript?. My program knowledge is not very high but if you pass me an example I thinks I will figure out how to do this.

    Let me know if you would like my EditView.php or my DetailView.php of the module.

    Thanks a lot
    Last edited by jlabuelo; 2010-10-13 at 05:16 PM.

  9. #9
    sabal is offline Member
    Join Date
    Mar 2012
    Posts
    9

    Default Re: Show fields depending on a dropdown value

    Hi,

    Add one custom field to the module.
    choose type as relate and filled all the require field,also choose the correct module name in Module field.
    As you want the field to be dependent, check the dependent option and write the formula there



    - Sabal

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 2012-01-08, 02:23 PM
  2. editview make fields readonly depending on status
    By mikesolomon in forum Developer Help
    Replies: 4
    Last Post: 2010-04-09, 04:36 PM
  3. Dynamically show/hide fields based on dropdown selection
    By moresugar in forum Developer Help
    Replies: 3
    Last Post: 2009-04-21, 09:39 PM
  4. disabling fields in edit view depending on role
    By danrweki in forum Developer Help
    Replies: 1
    Last Post: 2008-09-24, 07:44 AM
  5. Replies: 3
    Last Post: 2006-06-30, 08:43 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
  •