Results 1 to 10 of 10

Thread: Custom dropdown in Meetings

  1. #1
    tech is offline Sugar Community Member
    Join Date
    Mar 2007
    Posts
    11

    Default Custom dropdown in Meetings

    I want to add a custom dropdown in "Meetings". To do this :
    - I create a drop down with 4 items in the list
    - I create a custom field "dropdown" associate with the list above
    - I add the custome field in the detail and edit view

    Sugar 4.5.1b (Build 1246) - Meeting
    - it's not a dropdown but a multi select that is created
    - the list is empty

    Sugar 4.5.1 (Build 1197) - Meeting
    - the dropdown is ok
    - the list is empty

    Test in Account:
    Sugar 4.5.1b (Build 1246)
    - it's not a dropdown but a multi select that is created
    - the list is full

    Sugar 4.5.1 (Build 1197)
    - It's ok

    How can I resolve my problem

    thank you

    Julien

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Custom dropdown in Meetings

    There is a bug in Meetings/EditView.php. This Editview.php is fixed and will create your custom fields correctly.
    Attached Files Attached Files
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    monicabohanon is offline Junior Member
    Join Date
    Apr 2007
    Posts
    3

    Default Custom dropdown in Opportunities

    I'm having a similar situation with the Opportunities module where I create a dropdown in both the detail and edit screens. When I test the field I can select the value when I edit a record (I created this as a dropdown but it shows as a multi-field), yet once the record is saved it does not display the selected drop down value on the details screen. The field label is still there, although the value is completely void. This field has also been set as a required field, yet the record allows me to save if there are no values selected for this field. When I pull up the record again to edit, there are no field values highlighted/selected (along with the value I previously selected after saving the record). I've deleted the field and recreated numerous times with the exact same problem. I've even attempted to do this with a newly created dropdown with no luck. I've also gone to the extreme of linking the field to a completely different dropdown that I know works on other screens, still the same problem. Only occurs on the Opportunities module in the detail view. Any hints or is this a bug and can SugarCRM development offer a working Opportunities/Editview.php or Opportunities/Detailview.php?

    The version of SugarCRM I'm using is Version 4.5.1b (Build 1246) .

    Thanks in advance for your help!
    ~M
    Last edited by monicabohanon; 2007-04-03 at 01:49 PM. Reason: Adding Version Info

  4. #4
    tech is offline Sugar Community Member
    Join Date
    Mar 2007
    Posts
    11

    Default Re: Custom dropdown in Meetings

    Thank you kbrill for the fix, my dropdown is loaded correctly but :
    - my dropdown is still a multi select (it's not a problem, I'have change the editview.html)
    - the value selected is not saved.
    Is there another fix available ?
    Thank you
    Tech

  5. #5
    monicabohanon is offline Junior Member
    Join Date
    Apr 2007
    Posts
    3

    Default Re: Custom dropdown in Meetings

    Quote Originally Posted by tech
    Thank you kbrill for the fix, my dropdown is loaded correctly but :
    - my dropdown is still a multi select (it's not a problem, I'have change the editview.html)
    - the value selected is not saved.
    Is there another fix available ?
    Thank you
    Tech

    Per my posting above (under Monica Bohanon), I have what appears to be a duplicate problem to the referenced quote although my issue is within the Opportunities module, not Meetings. I've attached my Opportunities/EditView.php & Opportunities/DetailView.php (your file attachment system will not allow attachment of the .html's that go with these files, giving an error that the .html files are not of valid file type). My dropdown field is named "Reason Lost:" key reas_lost_c and is linked to the "opportunity_reason_lost" dropdown. I do not have any non-alpha-numeric options populated within the dropdown list that could give cause for this problem. Any suggestions you may have would be greatly appreciated.
    Kind regards,
    ~M
    Attached Files Attached Files

  6. #6
    devknob is offline Member
    Join Date
    Apr 2007
    Posts
    8

    Default Re: Custom dropdown in Meetings

    extremely frustrating that these 'fixes' dont work. no drop downs

  7. #7
    pblag's Avatar
    pblag is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Ukraine (Chernivtsy)
    Posts
    347

    Default Re: Custom dropdown in Meetings

    Hi All!

    The problem is in two places:

    1) When you create new dropdown custom field there is bug in file :
    modules/DynamicFields/templates/Fields/TemplateEnum.php

    there is code
    //correct code
    function get_html_edit(){
    $this->prepare();
    $xtpl_var = strtoupper( $this->name);
    return "<select title='{" . $xtpl_var."_HELP}' name=\"". $this->name . "\">{OPTIONS_".$xtpl_var. "}</select>";
    }
    ////end of correct code

    // incorrect code
    function get_html_edit() {
    $this->prepare();
    $xtpl_var = strtoupper( $this->name);
    return '<select name="'. $this->name . '[]" size="3" title="{' . $xtpl_var .'_HELP}" multiple="multiple">{OPTIONS_'. $xtpl_var. '}</select>';
    }
    //end of incorrect code

    So when you create new dropdown custom field code for this field generates with errors like for multienum

    2) If you want to fix current situation you have to change files with name 'EditView.html' in the modules directories. Please remove multienum word from select tag and change name of select tag from 'name[]' to 'name'

    BTW: These files can be located in the folders custom/modules/....(Accounts,Meetings,Contacts etc.)

    If you have any questions you can ask me

    Petro Blagodir,
    pblag@blagodir.com
    Blagodir Software - SugarCRM (Innstallation Customization Support )
    Last edited by pblag; 2007-04-17 at 02:47 PM.

  8. #8
    devknob is offline Member
    Join Date
    Apr 2007
    Posts
    8

    Default Re: Custom dropdown in Meetings

    data still wont save and multi boxes still there for some reason

  9. #9
    pblag's Avatar
    pblag is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Ukraine (Chernivtsy)
    Posts
    347

    Default Re: Custom dropdown in Meetings

    Hi devknob!

    if you interested i can fix it for you.
    Just email me and we will fix this problem.

    Regards,
    Petro Blagodir
    pblag@blagodir.com


    Blagodir Software - SugarCRM (Innstallation Customization Support )

  10. #10
    tina2007 is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    26

    Default Re: Custom dropdown in Meetings

    Quote Originally Posted by pblag
    Hi All!

    The problem is in two places:

    1) When you create new dropdown custom field there is bug in file :
    modules/DynamicFields/templates/Fields/TemplateEnum.php

    there is code
    //correct code
    function get_html_edit(){
    $this->prepare();
    $xtpl_var = strtoupper( $this->name);
    return "<select title='{" . $xtpl_var."_HELP}' name=\"". $this->name . "\">{OPTIONS_".$xtpl_var. "}</select>";
    }
    ////end of correct code

    // incorrect code
    function get_html_edit() {
    $this->prepare();
    $xtpl_var = strtoupper( $this->name);
    return '<select name="'. $this->name . '[]" size="3" title="{' . $xtpl_var .'_HELP}" multiple="multiple">{OPTIONS_'. $xtpl_var. '}</select>';
    }
    //end of incorrect code

    So when you create new dropdown custom field code for this field generates with errors like for multienum

    2) If you want to fix current situation you have to change files with name 'EditView.html' in the modules directories. Please remove multienum word from select tag and change name of select tag from 'name[]' to 'name'

    BTW: These files can be located in the folders custom/modules/....(Accounts,Meetings,Contacts etc.)

    If you have any questions you can ask me

    Petro Blagodir,
    pblag@blagodir.com
    Blagodir Software - SugarCRM (Innstallation Customization Support )
    I changed the files as you say. Now it shows the dropdown list, but without values, why?
    another question, how can I delete the custom field and the dorpdowns which are created by myself?
    Last edited by tina2007; 2007-04-24 at 08:11 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Bug in Meetings Editview custom field
    By inmapi in forum Help
    Replies: 2
    Last Post: 2006-09-17, 03:26 PM
  2. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  3. Replies: 7
    Last Post: 2006-06-06, 07:56 PM
  4. Replies: 0
    Last Post: 2005-08-26, 01:09 PM
  5. Contact Search Form - Custom Dropdown Field
    By aram in forum General Discussion
    Replies: 2
    Last Post: 2005-05-01, 03:57 AM

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
  •