Results 1 to 4 of 4

Thread: Adding a new dropdown field in DocumentRevisions

  1. #1
    enrikm is offline Sugar Community Member
    Join Date
    Dec 2006
    Posts
    61

    Default Adding a new dropdown field in DocumentRevisions

    Good afternoon all,

    I am trying to add a new dropdown field in the DocumentRevisions Module. Since this is not found in the studio, I had to hard-code placing the field in the right spot. I first created a dropdown named 'Approved' then created a custom field via the studio named 'adstatus'. Finally I edited the DocumentRevision/Editview.html file and entered:


    <td class="dataLabel"><span sugar='slot2'>{MOD.adstatus_c}</span sugar='slot'></td>
    <td class="dataField"><span sugar='slot2b'><select name="adstatus_c title="{ADSTATUS_C_HELP}">{OPTIONS_ADSTATUS_C}</select></span sugar='slot'></td>


    This is the exact code from others, I just changed the name of the field. However, my problem is that the dropdown list is empty. The label is ok though so it means that the field is detected. It's just the dropdown list that is not populated.

    Any help? Thanks a lot.

  2. #2
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Default Re: Adding a new dropdown field in DocumentRevisions

    Enrico,

    Not sure but I think you need to make sure the values of the drop down are getting loaded. You might need a requireonce in your php file to load the custom dropdown.

    Haven't messed much with this module so don't know if its different from the rest. Seems though that studio should be able to handle it all the way.
    Good luck Paris

  3. #3
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Adding a new dropdown field in DocumentRevisions

    Hey enrikm,

    DocumentRevisions isn't set up for custom fields (as you already know). To get it to load custom fields this needs to be added to EditView.php (in addition to your html changes):
    PHP Code:

    //Add Custom Fields
    require_once('modules/DynamicFields/templates/Files/EditView.php'); 

  4. #4
    eddiechen is offline Sugar Community Member
    Join Date
    Jun 2008
    Posts
    462

    Default Re: Adding a new dropdown field in DocumentRevisions

    I also have same requirement, and meet the same problem.

    /Add Custom Fields
    require_once('modules/DynamicFields/templates/Files/EditView.php');

    the code add to which files?
    Attached Images Attached Images  

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  2. Error When Adding To Dropdown Menus
    By jnovak in forum Help
    Replies: 1
    Last Post: 2006-03-23, 07:58 PM
  3. New dropdown field in CALLs
    By ludvik in forum General Discussion
    Replies: 0
    Last Post: 2005-06-23, 09:17 AM
  4. 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
  •