var hintText = "{/literal}{ts escape='js'}Type in a partial or complete name of an existing contact.{/ts}{literal}";
cj( "#assignee_contact_id").tokenInput( tokenDataUrl_assignee, { prePopulate: assignee_contact, theme: 'facebook', hintText: hintText });
cj( 'ul.token-input-list-facebook, div.token-input-dropdown-facebook' ).css( 'width', '450px' );
- cj('#source_contact_id').autocomplete( sourceDataUrl, { width : 180, selectFirst : false, hintText: hintText, matchContains: true, minChars: 1
+ cj('#source_contact_id').autocomplete( sourceDataUrl, { width : 180, selectFirst : false, hintText: hintText, matchContains: true, minChars: 1, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result( function(event, data, formatted) { cj( "#source_contact_qid" ).val( data[1] );
}).bind( 'click', function( ) { cj( "#source_contact_qid" ).val(''); });
});
width : 250,
selectFirst : false,
matchCase : true,
- matchContains: true
+ matchContains: true,
+ max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result( function(event, data, formatted) {
var foundContact = ( parseInt( data[1] ) ) ? cj( "#current_employer_id" ).val( data[1] ) : cj( "#current_employer_id" ).val('');
if ( ! foundContact.val() ) {
var contactElement = '#' + prefix + 'contact_' + blockNo;
var contactHiddenElement = 'input[name="{/literal}{$prefix}{literal}contact_select_id[' + blockNo +']"]';
cj( contactElement ).autocomplete( contactUrl, {
- selectFirst : false, matchContains: true, minChars: 1
+ selectFirst : false, matchContains: true, minChars: 1, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result( function(event, data, formatted) {
cj( contactHiddenElement ).val(data[1]);
{/literal}
{* Javascript method to populate the location fields when a different existing related contact is selected *}
{literal}
var dataUrl = "{/literal}{$employerDataURL}{literal}";
- cj('#organization_id').autocomplete( dataUrl, { width : 180, selectFirst : false, matchContains: true
+ cj('#organization_id').autocomplete( dataUrl, { width : 180, selectFirst : false, matchContains: true, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result( function(event, data, formatted) {
cj('#organization_name').val( data[0] );
cj('#onbehalfof_id').val( data[1] );
var relContact = cj('#contact_1');
if ( relType ) {
var dataUrl = {/literal}'{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Contact_Page_AJAX&fnName=getContactList&json=1&context=relationship&rel="}'{literal} + relType;
- relContact.autocomplete( dataUrl, { width : 180, selectFirst : false, matchContains: true });
+ relContact.autocomplete( dataUrl, { width : 200, selectFirst : false, matchContains: true, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal} });
relContact.result(function( event, data ) {
cj("input[name='contact_select_id[1]']").val(data[1]);
cj('#relationship-refresh-save').show( );
cj('#onbehalf_organization_name').autocomplete( dataUrl,
{ width : 180,
selectFirst : false,
- matchContains : true
+ matchContains : true,
+ max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result( function( event, data, formatted ) {
cj('#onbehalf_organization_name').val( data[0] );
cj('#onbehalfof_id').val( data[1] );
if ( !customObj.hasClass('ac_input') ) {
customObj.autocomplete( url,
- { width : 250, selectFirst : false, matchContains: true
+ { width : 250, selectFirst : false, matchContains: true, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result(
function(event, data ) {
customIdObj.val( data[1] );
if ( !customObj.hasClass('ac_input') ) {
customObj.autocomplete( url,
- { width : 250, selectFirst : false, elementId: custom, matchContains: true, formatResult: {/literal}validate{$element_name|replace:']':''|replace:'[':'_'|replace:'-':'_'}{literal}
+ { width : 250, selectFirst : false, elementId: custom, matchContains: true, formatResult: {/literal}validate{$element_name|replace:']':''|replace:'[':'_'|replace:'-':'_'}{literal}, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result(
function(event, data ) {
customIdObj.val( data[1] );
width : 250,
selectFirst : false,
matchCase : true,
- matchContains: true
+ matchContains: true,
+ max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result( function(event, data, formatted) {
( parseInt( data[1] ) ) ? cj( "#contact_id" ).val( data[1] ) : cj( "#contact_id" ).val('');
});
var orgDataUrl = "{/literal}{$dataUrl}{literal}";
var hintText = "{/literal}{ts escape='js'}Type in a partial or complete name of an existing contact.{/ts}{literal}";
cj('#member_of_contact').autocomplete( orgDataUrl,
- { width : 180, selectFirst : false, hintText: hintText, matchContains: true, minChars: 1
+ { width : 200, selectFirst : false, hintText: hintText, matchContains: true, minChars: 1, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
}).result(
function(event, data, formatted) {
( parseInt( data[1] ) ) ? cj( "#member_of_contact_id" ).val( data[1] ) : cj( "#member_of_contact_id" ).val('');