Results 1 to 10 of 10

Thread: Non-Coder in desperate need of help!!!

  1. #1
    Remy is offline Member
    Join Date
    Nov 2006
    Posts
    7

    Default Non-Coder in desperate need of help!!!

    O/S = Win XP (pro)
    Sugar Suite version = 4.2.1
    Web Server = Apache 1.8.0.0
    PHP version = Not sure

    Thanks for reading my thread. This is the 3rd thread I've started, like the others before it's about the Sugar email module. I'm not a coder so the idea of manipulating php code is a little intimidating. Hopefully someone has an easy solution to my problem.

    Here's what I need to do in Sugar.

    From the Emails module in the edit screen, when composing a new email, I need to be able to click the "cc" or " bcc" select button then select specific contacts but instead of the very limited pop-up that appears I need to be able to select contacts the same way I can in the Contacts/contacts advanced search window.

    I was able to edit my Contacts module search & add 7 custom checkboxes. I would like this todo the same in Email contact search as well but this module does not seem editable.

    Is it possible to edit or customize this email pop-up window? If so how?
    Last edited by Remy; 2006-12-14 at 02:01 PM.

  2. #2
    cywolf's Avatar
    cywolf is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Toronto, Canada
    Posts
    223

    Default Re: Non-Coder in desperate need of help!!!

    There isn't any way to do this using the Studio, so unfortunately you'll either have to either dive into the code or hire a programmer to add the fields for you. In this case I think you would have to edit modules/Contacts/metadata/popupdefs.php to define the new search fields and modules/Contacts/Popup_picker.html to add them to the interface. There isn't any real programming involved here, just data definitions, but it's still a highly technical task.
    Andrew Whitehead
    The Long Reach Corporation
    http://infoathand.com

  3. #3
    Remy is offline Member
    Join Date
    Nov 2006
    Posts
    7

    Default Re: Non-Coder in desperate need of help!!!

    Thanks CyWolf,

    I've made changes to the modules you mentioned & my fields now appear in the list portion but not the upper search portion.

    How can I get my fields to appear in the upper search portion of the window?

  4. #4
    sagarladdha is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    70

    Default Re: Non-Coder in desperate need of help!!!

    Quote Originally Posted by Remy
    Thanks CyWolf,

    I've made changes to the modules you mentioned & my fields now appear in the list portion but not the upper search portion.

    How can I get my fields to appear in the upper search portion of the window?
    Hi Remy,

    To get your fields in the upper search portion, go to the following location:

    Your installation path\htdocs\sugarcrm\modules\Contacts

    Now open the file SearchForm.html. Here you will see the following piece of code:

    <td class="dataLabel" noWrap><span sugar='slot1'>{MOD.LBL_FIRST_NAME}</span sugar='slot'>&nbsp;&nbsp;<span sugar='slot1b'><input type=text size="10" name="first_name_basic" class=dataField value="{FIRST_NAME}"></span sugar='slot'></td>
    <td class="dataLabel" noWrap><span sugar='slot2'>{MOD.LBL_LAST_NAME}</span sugar='slot'>&nbsp;&nbsp;<span sugar='slot2b'><input type=text size="10" name="last_name_basic" class=dataField value="{LAST_NAME}"></span sugar='slot'></td>

    <td class="dataLabel" noWrap><span sugar='slot3'>{MOD.LBL_ACCOUNT_NAME}</span sugar='slot'>&nbsp;&nbsp;<span sugar='slot3b'><input type=text size="10" name="account_name_basic" class=dataField value="{ACCOUNT_NAME}"></span sugar='slot'></td>

    Now, below this, add the following code. Don't worry it's all pretty easy. And if you understand a little html then its a cakewalk. Here, I have written {MOD.LBL_DO_NOT_CALL}. Thats because I tried it for the DO Not Call check box. You can write the label name of whichever field you want to put there. Just have a look at the label of that field and write it here. Next is input name. Write whatever name you want for the field but it is always a good practice to follow the conventions. I have written do_not_call_basic which indicates the field name and the basic is appended to indicate that this is a field in the basic search page. In the end, there is {DO_NOT_CALL}. Here you have to write the value of the filed which is generally the field name if its a default field. If it is a custom field added by you, then it will generally be the field name followed by an "_C". You can see the exact name from the second table tag in the same file. Go to the line of code for your field in the same file. It will be somewhere below the place where we are working now. And see the value= part in that line. Just copy that name from there and write it where we want it above.


    <td class="dataLabel">{MOD.LBL_DO_NOT_CALL}&nbsp;&nbsp ;<input name='do_not_call_basic' onchange='this.form.submit();' type="checkbox" class="checkbox" {DO_NOT_CALL}></td>

    I hope you are clear with all this. I know tis a bit cnofusing for a non coder as you have specified her. In case, you are not able to understand all this just attach your fiel in the next post and I will do it for you. It's a pretty simple job of hardly 5 mins.

    Regards,

    Sagar Laddha
    India

  5. #5
    Remy is offline Member
    Join Date
    Nov 2006
    Posts
    7

    Default Re: Non-Coder in desperate need of help!!!

    Thank you Sagar,

    As per your previous post here is the html code I added to the searchForm.html in green:

    <table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
    <tr>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <form>
    <td class="dataLabel" noWrap><slot>{MOD.LBL_FIRST_NAME}</slot>&nbsp;&nbsp;<slot><input type=text size="10" name="first_name" class=dataField value="{FIRST_NAME}"></slot></td>
    <td class="dataLabel" noWrap><slot>{MOD.LBL_LAST_NAME}</slot>&nbsp;&nbsp;<slot><input type=text size="10" name="last_name" class=dataField value="{LAST_NAME}"></slot></td>
    <td class="dataLabel" noWrap><slot>{MOD.LBL_ACCOUNT_NAME}</slot>&nbsp;&nbsp;<slot><input type=text size="10" name="account_name" class=dataField value="{ACCOUNT_NAME}"></slot></td>


    <td class="dataLabel">{MOD.OTA_Group_c}&nbsp;&nbsp;<in put name='ota_group_c' onchange='this.form.submit();' type='checkbox' class="checkbox" {OTA_GROUP_C}></slot></td>
    <td class="dataLabel">{MOD.Canada_c}&nbsp;&nbsp;<input name='canada_c' onchange='this.form.submit();' type="checkbox" class="checkbox" {CANADA_C}></td>
    <td class="dataLabel">{MOD.USA_c}&nbsp;&nbsp;<input name='usa_c' onchange='this.form.submit();' type="checkbox" class="checkbox" {USA_C}></td>
    <td class="dataLabel">{MOD.TCA_c}&nbsp;&nbsp;<input name='tca_c' onchange='this.form.submit();' type="checkbox" class="checkbox" {TCA_C}></td>
    <td class="dataLabel">{MOD.McLeod__c}&nbsp;&nbsp;<inpu t name='mcleod_c' onchange='this.form.submit();' type="checkbox" class="checkbox" {MCLEOD_C}></td>
    <td class="dataLabel">{MOD.French_c}&nbsp;&nbsp;<input name='french_c' onchange='this.form.submit();' type="checkbox" class="checkbox" {FRENCH_C}></td>
    <td class="dataLabel">{MOD.Staff_c}&nbsp;&nbsp;<input name='staff_c' onchange='this.form.submit();' type="checkbox" class="checkbox" {STAFF_C}></td>


    <td class="dataLabel">{APP.LBL_CURRENT_USER_FILTER}&nb sp;&nbsp;<input name='current_user_only' onchange='this.form.submit();' type="checkbox" class="checkbox" {CURRENT_USER_ONLY}></td>
    <td align="right"><input type="hidden" name="action" value="index"/>
    <input type="hidden" name="query" value="true"/>
    <input type="hidden" name="module" value="Contacts" />
    <input title="{APP.LBL_SEARCH_BUTTON_TITLE}" accessKey="{APP.LBL_SEARCH_BUTTON_KEY}" class="button" type="submit" name="button" value="{APP.LBL_SEARCH_BUTTON_LABEL}"/>
    <input title="{APP.LBL_CLEAR_BUTTON_TITLE}" accessKey="{APP.LBL_CLEAR_BUTTON_KEY}" onclick="clear_form(this.form);" class="button" type="button" name="clear" value=" {APP.LBL_CLEAR_BUTTON_LABEL} "/><br>
    <a href='index.php?module=Contacts&action=index&advan ced=true' class="tabFormAdvLink">{ADVANCED_SEARCH_PNG}</a>&nbsp;<a href='index.php?module=Contacts&action=index&advan ced=true' class="tabFormAdvLink">{APP.LNK_ADVANCED_SEARCH}</a>
    </td>
    </tr>
    </form>
    </table>

    </td></tr>
    </tr></table>


    Adding this code did not alter the search in any way. Is there something I'm not doing right or am I missing something?

  6. #6
    sagarladdha is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    70

    Default Re: Non-Coder in desperate need of help!!!

    Hi Remy,

    I am very sorry but I forgot that you want to modify the pop up that is displayed when you press the select button. I thought that you just wanted to modify the main page where you see the list view. Just give me a day and I will look for the solution to your problem. By the way, what changes do you see after including this code?

    Regards,

    Sagar Laddha

  7. #7
    Remy is offline Member
    Join Date
    Nov 2006
    Posts
    7

    Default Re: Non-Coder in desperate need of help!!!

    Hi Sagar,

    In my previous reply I mentioned that I hadn't seen any changes after inserting the code but just now I noticed why I couldn't see any changes. I was looking in the wrong place. I had been checking in Emails->compose email-> the dropdown list with accounts, Contacts etc. When I looked in Contacts->Contacts Search is when I noticed my custom checkbox fields were actually added.

    So it would seem everything is correct except for where the changes have been applied. I need to be able to make these changes in the email search.

    Which file do I need to edit to accomplish this?

  8. #8
    cywolf's Avatar
    cywolf is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Toronto, Canada
    Posts
    223

    Default Re: Non-Coder in desperate need of help!!!

    Looks like you want modules/Contacts/Email_picker.html instead (same format as Popup_picker.html).
    Andrew Whitehead
    The Long Reach Corporation
    http://infoathand.com

  9. #9
    Remy is offline Member
    Join Date
    Nov 2006
    Posts
    7

    Default Re: Non-Coder in desperate need of help!!!

    Thanks again CyWolf,

    Finally we have progress! I now have all my custom fields appearing in my contacts search but there are two small problems.

    #1 - The values for my custom fields are not visible in the Contact List, The headers are there but the values just aren't there.

    #2 - Whenever I do a search from this screen the contact in my list are no longer selectable.

    Here's a copy of my code:

    <!-- BEGIN: list_nav_row -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
    {PAGINATION}
    <!-- END: list_nav_row -->
    <tr height="20">
    <td scope="col" class="listViewThS1" NOWRAP>{CHECKALL}</td>
    <td scope="col" width="40%" class="listViewThS1" nowrap="nowrap"><a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_LIST_CONTACT_NAM E}{arrow_start}{last_name_arrow}{arrow_end}</a></td>
    <td scope="col" width="20%" class="listViewThS1" nowrap="nowrap"><a href="{ORDER_BY}email1" class="listViewThLinkS1">{MOD.LBL_LIST_EMAIL_ADDRE SS}{arrow_start}{email1_arrow}{arrow_end}</a></td>
    <td scope="col" width="40%" class="listViewThS1" nowrap="nowrap">{MOD.LBL_LIST_ACCOUNT_NAME}</td>
    <td scope="col" width="10%" class="listViewThS1" nowrap="nowrap">{MOD.OTA_Group_c}</td>
    <td scope="col" width="10%" class="listViewThS1" nowrap="nowrap">{MOD.Canada_c}</td>
    <td scope="col" width="10%" class="listViewThS1" nowrap="nowrap">{MOD.USA_c}</td>
    <td scope="col" width="10%" class="listViewThS1" nowrap="nowrap">{MOD.TCA_c}</td>
    <td scope="col" width="10%" class="listViewThS1" nowrap="nowrap">{MOD.McLeod_c}</td>
    <td scope="col" width="10%" class="listViewThS1" nowrap="nowrap">{MOD.French_c}</td>
    <td scope="col" width="10%" class="listViewThS1" nowrap="nowrap">{MOD.Staff_c}</td>
    </tr>
    <!-- BEGIN: row -->
    <tr height="20"
    onmouseover="setPointer(this, '{CONTACT.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
    onmouseout="setPointer(this, '{CONTACT.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
    onmousedown="setPointer(this, '{CONTACT.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
    <td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
    <td scope='row' valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><a href="#" class="listViewTdLinkS1" onclick="send_back('Contacts','{CONTACT.ID}');">{C ONTACT.FIRST_NAME}&nbsp;{CONTACT.LAST_NAME}</a></td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
    <a href="#" class="listViewTdLinkS1" onclick="send_back('Contacts','{CONTACT.ID}');">{C ONTACT.EMAIL1}</a><br />
    <a href="#" class="listViewTdLinkS1" onclick="send_back('Contacts','{CONTACT.ID}');">{C ONTACT.EMAIL2}</a></td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACT.ACCOUNT_NAME}</td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><a href="#" class="listViewTdLinkS1" onclick="send_back('Contacts','{CONTACT.ID}');">{C ONTACT.OTA_Group_c}</a></td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACT.canada_c}</td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACT.usa_c}</td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACT.tca_c}</td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACT.mcleod_c}</td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">{CONTACT.french_c}</td>
    <td valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}"><a href="#" class="listViewTdLinkS1" onclick="send_back('Contacts','{CONTACT.ID}');">{C ONTACT.staff_c}</a></td>
    </tr>
    <tr><td colspan="20" class="listViewHRS1"></td></tr>
    <!-- END: row -->
    {ASSOCIATED_JAVASCRIPT_DATA}
    </table>
    <!-- END: main -->

  10. #10
    cywolf's Avatar
    cywolf is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Toronto, Canada
    Posts
    223

    Default Re: Non-Coder in desperate need of help!!!

    Try capitalizing the custom field names to get the values to show up. The XTemplate/Smarty template variable names are case-sensitive.

    It's not immediately obvious why the row can't be sent back when clicked. Perhaps you're missing quotes around an <input> element value attribute in the search form area. Are you getting a javascript error? (Try checking the javascript console in Firefox, or getting the web developer extension.)
    Andrew Whitehead
    The Long Reach Corporation
    http://infoathand.com

Thread Information

Users Browsing this Thread

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

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
  •