Results 1 to 5 of 5

Thread: Adding Search fields to Popup_picker?

  1. #1
    tj@estreet.com is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    163

    Default Adding Search fields to Popup_picker?

    For example, I have added invalid_email, to my Contacts/SearchForm.html and ListView.php and would like to do the same for Popup_picker. Of course, adding fields to the html is all kinds of easy, but how do I get them to actually work, retruning the results I want upon clicking search???? Where s the search funciton defined in Popup_picker, in Popup_picker.php or somewhere else??? (seems like must be somewhere else but can't figure where.)

  2. #2
    tj@estreet.com is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    163

    Default Re: Adding Search fields to Popup_picker?

    Just replied to a post asking for assistance with creating targets lists (don't know if it'll help but..) I have struggled for weeks now evolving a work flow around campaigns et al, and am close to having a workable solution, BUT... Long and short of it, Sugar campaigns and targeting presents the user with a really cumbersom and counterintuitive process that could sure be helped by a little more search/sort filter functionality in PopupPicker.html !!! Can someone chime in here on how that might be accmplished???
    Regards,
    TJ

  3. #3
    tj@estreet.com is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    163

    Default Re: Adding Search fields to Popup_picker?

    Of course, assuming I ever make any headway toward fuller search functionality from Popup_pickers et al, I'll also want the wherewithal to control things like $hide_clear_button and whethor or not to display a showAdd button allowing for the creation of new contacts.

    Example: I find the string $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true; in Popup_picker.php, but can't for the life of me decipher where or how that value is called or set.

    Throw me a Bone Here -- anything -- the slightest trail of bread crumbs.

    What is the basic path assuming a call to Contacts/Popuup_picker from ProspectLists/DetailView/ContactsSubpanel?
    Where are the values for Popup_Picker set?

    Regards,
    TJ

  4. #4
    tj@estreet.com is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    163

    Default Re: Adding Search fields to Popup_picker?

    Still at it. Any input would be welcome

  5. #5
    edvsw is offline Sugar Community Member
    Join Date
    Nov 2006
    Location
    Wetzlar, Germany
    Posts
    23

    Default Re: Adding Search fields to Popup_picker?

    eg add SearchFields "City" and "Account_name" in Leads-Popup:

    change :\modules\Leads\Popup_picker.html
    PHP Code:
    <form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
    <
    table width="100%" border="0" cellspacing="0" cellpadding="0">
    <
    tr>
    <
    td class="dataLabel" nowrap="nowrap">{MOD.LBL_FIRST_NAME}</td>
    <
    td class="dataField"><input type="text" size="10" name="first_name" class="dataField" value="{FIRST_NAME}" /></td>
    <
    td class="dataLabel" nowrap="nowrap">{MOD.LBL_LAST_NAME}</td>
    <
    td class="dataField"><input type="text" size="10" name="last_name" class="dataField" value="{LAST_NAME}" /></td>
    .....
    <
    input type="hidden" name="mode" value="{MULTI_SELECT}" />
    </
    td>
    </
    tr>
    <!-- 
    Add the following for  ACCOUNT_NAME CITY -->
    <
    tr>
    <
    td class="dataLabel" nowrap="nowrap">{MOD.LBL_ACCOUNT_NAME}</td>
    <
    td class="dataField"><input type="text" size="10" name="account_name" class="dataField" value="{ACCOUNT_NAME}" /></td>
    <
    td class="dataLabel" nowrap="nowrap">{MOD.LBL_CITY}</td>
    <
    td class="dataField"><input type="text" size="10" name="address_city" class="dataField" value="{ADDRESS_CITY}" /></td>
    </
    tr
    then change :\modules\Leads\metadata\popupdefs.php to

    PHP Code:
    'whereClauses' => 
                                array(
    'first_name' => 'leads.first_name'
                                        
    'last_name' => 'leads.last_name',
                                        
    'lead_source' => 'leads.lead_source',
                                        
    'status' => 'leads.status',
                                        
    'account_name' => 'leads.account_name',  //added
                                        
    'address_city' => 'leads.primary_address_city' //added
                                        
    ),
                            
    'selectDoms' =>
                                array(
    'LEAD_SOURCE_OPTIONS' => 
                                                array(
    'dom' => 'lead_source_dom''searchInput' => 'lead_source'),
                                        
    'STATUS_OPTIONS' => 
                                                array(
    'dom' => 'lead_status_dom''searchInput' => 'status')
                                        ),
                            
    'searchInputs' =>
                                array(
    'first_name''last_name''lead_source''status''account_name''address_city' ), //added account_name and adress_city 
    And now it should work

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
  •