Results 1 to 3 of 3

Thread: Customized field, Upload file

  1. #1
    Heilong is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Shanghai (China)
    Posts
    29

    Default Customized field, Upload file

    Hi guys,

    I'm trying to modify a module to add 2 customized fields, these 2 fields will help my user to upload 2 files on the server.

    I already modified the "EditView.html" and added on it 2 fields of file type, I also modified the PHP file associated to that module "SimpleModule.php", in this PHP file I just added the code to manage the upload especially in the "save" function.

    Then I modified the "DetailView.html" to create the links associated to the 2 files, clicking on the link will give access to the files.
    But the problem is these 2 links are empty when the page is displayed.

    I don't know exactly which to modify to make the links work. So I need help for this modification, i've also attached the files to this post.

    Thanks,

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

    Lightbulb Re: Customized field, Upload file

    Sounds like you should be using the documents module and associating the documents with the specific account.

    Sounds like you are trying to do things the hard way! Also I will assume you are still using 4.5.1 instead of 5.0.

    Are the custom fields meant for the user to add the path and file name or to do what? If its only a link. put the link there and display it in detailview. Also, have you been using the studio to do these mods or trying it on your own! Use the studio first and THEN modify the html.

    Note make sure you are saving a copy since these will not be upgrade safe. Read more about this in the WIKI.

    Hope this helps, Take a look at the Documents module and see if you are making more work for yourself than you need to!

    Thanks Paris

  3. #3
    Heilong is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Shanghai (China)
    Posts
    29

    Default Re: Customized field, Upload file

    In fact,

    After uploading the files using the 2 customized fields (type file). The link will be created in the 'DetailView', so I need to modify a file to handle registring the path of these 2 files, path associated to the post created.

    By the way, I'm still running the 4.5.1 version.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. FILE UPLOAD Field ( How To Add Mannually)
    By sun.rajasekhar in forum Developer Help
    Replies: 9
    Last Post: 2011-11-24, 08:31 AM
  2. File Upload Field
    By davidolaj in forum Feature Requests
    Replies: 5
    Last Post: 2007-09-08, 10:17 AM
  3. Replies: 2
    Last Post: 2006-04-18, 02:47 PM
  4. Replies: 3
    Last Post: 2006-02-17, 05:12 PM
  5. PATCH: HTML Emails and Templates
    By funkypenguin in forum Downloads
    Replies: 2
    Last Post: 2005-05-31, 10:14 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
  •