[Vtigercrm-developers] Request for 6.2 (Popup filtering)
Alan Lord
alanslists at gmail.com
Fri Oct 17 11:22:51 GMT 2014
We are frequently asked to do this and it would be better if we could
achieve it without core hacks.
For 1:n (get_dependents_list) relationships when selecting related
records to add to a module, it is fairly easy. I have already suggested
two very minor code additions to Popup.tpl[1] that would enable us to
set the search_key and search_value in the request which would then
automatically set the picklist and search box, thereby filtering the
list displayed... (This is especially important now we can reliably have
multiple UI10s to the same module)
For a n:n (get_related_list) however it's a bit more complicated. I
would like there to be some modification to the core Popup.php view and
RelationListView model so we could pass a module name and a crmid to
allow filtering of the list displayed in the popup. (Could probably use
the exiting related_parent_module & related_parent_id params).
For custom modules obviously we can override these classes if we need
to, but if we create a n:n to a standard vtiger module and want to limit
the result displayed in the Popup it gets rather tricky to say the least...
Thoughts? Comments?
Cheers
Al
[1]
> Add a test for SEARCH_VALUE and populate the search box
>> <input class="span2" type="text" placeholder="{vtranslate('LBL_TYPE_SEARCH')}" {if $SEARCH_VALUE} value="{$SEARCH_VALUE}" {/if} id="searchvalue"/>
> Add a test for SEARCH_KEY and select the right fieldname in the Select:
>
>> <option value="{$fieldName}" {if $fieldName eq $defaultSearchField} selected {/if}{if $fieldName eq $SEARCH_KEY} selected {/if}>{vtranslate($fieldObject->get('label'),$MODULE)}</option>
More information about the vtigercrm-developers
mailing list