Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: email address-like field control

  1. #1
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default email address-like field control

    Hi all,

    I'd like to customize the Accounts module with an array of fields, in the style of the email address block: one separated block, with a javascript control that allows users to add new arrays of fields(field1,field2,flag1,flag2,etc..) as user's wish.

    To make a quick customization, I had made my code modifications directly inside the files that manage the email address block.
    It kinda worked, with two unwanted side effects:
    my fields were inside the email address block and they were visible in every module showing that block.
    So I tried copying folder <sugar-root>/include/sugarEmailAddress/
    in a new one, modifying code to my needs in php and js files, adding a require once instruction for my modified php in
    <sugar-root>/modules/Account/account.php
    Result? a nice php error
    Either this is not the right mode or I made mistakes while changing code....

    Has anybody tried to develop such a thing?

    Any idea is appreciated, thx.


    Sugar CE 5.0.0a - MSWindows2003Server-IIS6 - PHP5 - MSSQL2005
    Last edited by DragonflyMaster; 2008-02-21 at 02:59 PM.
    What do you think the cookie monster eats ?

  2. #2
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: email address-like field control

    I still have this problem,
    is anybody out there who can help me?
    I've followed the path I started last time, now I don't get a PHP error, but A SQL one
    I'm sure there is a way that I have not considered.
    The smallest and most insignificant hint would be greatfully appreciated.
    Thanks
    What do you think the cookie monster eats ?

  3. #3
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: email address-like field control

    Ok,

    I'm still banging my head against the wall for this.
    I know I could find a different way to do what I need, but now I'm tremendously curious to know what is that I'm not getting.

    Briefly, I'm trying to build a custom field like the one used in accounts and contacts to store email addresses in edit and detail views.
    Basically, I need to implement this field because:

    1. I need it separated from the other fields (ie: name, phone number, etc)
    2. I need an array of four text fields linked to each other
    3. I need a button like the "add email" to eventually add further arrays on the fly
    Looking into Sugar's structure, I discovered that that particular field is a class defined in <sugar-root>\include\SugarEmailAddress\SugarEmailAddress. php.
    It uses a template defined in <sugar-root>\include\SugarEmailAddress\templates\*.tpl
    and some javascript functions defined in <sugar-root>\include\SugarEmailAddress\SugarEmailAddress. js

    In my last attempt to re-create this field, I
    1. created a custom field myField in Accounts Module (I want this custom field there)
    2. added custom code for this field in <sugar-root>\custom\modules\Accounts\metadata\editviewdef s.php that does the same as <sugar-root>\include\SugarEmailAddress\templates\forEditV iew.tpl
    3. wrote a <sugar-root>\custom\modules\Accounts\myField.js which defines the javascript functions as done in <sugar-root>\include\SugarEmailAddress\SugarEmailAddress. js
    Now my question is: since SugarEmailAddress.js uses some variables taken from SugarEmailAddress.php, where should I put my version of those functions to have them work properly?
    I tried many different solutions, none of them actually working.
    All I've got so far is a brand new non-functioning custom field
    Please somebody drop me a line on this....
    Also a "you looser!" would be better than nothing
    Last edited by DragonflyMaster; 2008-04-28 at 03:13 PM.
    What do you think the cookie monster eats ?

  4. #4
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: email address-like field control

    I thought I was on the right way to solve this issue,
    but I wasn't.
    I managed to create the visual part of the thing, ie:
    opening editview for an account I can see now the new "email-address"-like panel, and I can add\remove dinamically my new fields.
    what I haven't been able to accomplish so far is to save\retrieve these new fields to\from a db table.

    I also tried the 1tomany relationship wiki, which worked for me many other times, but it doesn't work here: I don't have a relate field, but a bunch of textfields.

    if nobody helps me out, I'm gonna surrender and solve this through a simple subpanel solution.
    Last edited by DragonflyMaster; 2008-04-28 at 03:11 PM.
    What do you think the cookie monster eats ?

  5. #5
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: email address-like field control

    Is there any trophy for the solution of this problem?
    Seems to be a very sophisticated problem.
    Is there anybody out there, who has an idea?

  6. #6
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: email address-like field control

    Quote Originally Posted by kuske
    Is there any trophy for the solution of this problem?
    Seems to be a very sophisticated problem.
    Is there anybody out there, who has an idea?
    The only trophy would be my neverending gratitude
    I find this riddle quite sophisticated, indeed...
    I wouldn't dislike if someone at SugarCRM chimed in...
    What do you think the cookie monster eats ?

  7. #7
    JVWay is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Corvallis, Oregon
    Posts
    452

    Default Re: email address-like field control

    Funny, just today I am wanting this exact thing.
    Jerry Way
    Business Process Administrator

    Sugar 6.1.4 Professional
    (Testing 6.1.2)
    LAMP on Centos 5
    PHP 5
    MySQL 5
    Apache 2.2

  8. #8
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: email address-like field control

    Quote Originally Posted by JVWay
    Funny, just today I am wanting this exact thing.
    Hi Jerry,
    I would appreciate if you had hints on this.
    What do you think the cookie monster eats ?

  9. #9
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: email address-like field control

    Posting again just to ask if someone out there has ideas to share on this topic.
    What do you think the cookie monster eats ?

  10. #10
    maloner's Avatar
    maloner is offline Sugar Community Member
    Join Date
    Mar 2007
    Location
    Westmeath & Dublin
    Posts
    95

    Default Re: email address-like field control

    Hi,

    I am also looking to implement the same functionality as that of the EmailAddresses.....did you manage to replicate it? If so can you point me in the right direction.

    John

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HOW-TO guide for Email Campaigns.
    By agupta in forum Marketing/Campaign Management
    Replies: 146
    Last Post: 2012-01-31, 03:08 PM
  2. email marketing feature requests
    By maxsutter in forum Feature Requests
    Replies: 1
    Last Post: 2008-10-11, 10:19 AM
  3. Replies: 1
    Last Post: 2008-05-14, 08:29 AM
  4. Second email address for contact bug
    By dcharman in forum General Discussion
    Replies: 0
    Last Post: 2005-12-28, 03:53 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
  •