How to change the module code to increase the autocomplete search results in webform. we have two contact one is enquirer and another is organisation its result 12 on autocomplete.

  • 1
    I don't understand your comments about 'enquirer and organisation' – petednz - fuzion Jun 18 at 22:25
  • 1
    i am Searching existing contact in the civicrm webform. autocomplete result limited to 12. how to overcome this. – kanchana Jun 20 at 5:19

It looks like line 669 here: https://git.drupalcode.org/project/webform_civicrm/blob/7.x-4.x/includes/contact_component.inc#L669

You can try changing the 12 to something else. It might work to replace it with Civi::settings()->get('search_autocomplete_count') and then it should use the value under Administer -> Customize Data and Screens -> Search Preferences -> Autocomplete Results. I haven't tested that.

  • Thanks demerit. I have changed search Preferences -> Autocomplete Results to 20 but it does not reflects. can you please share path of drupal component file to change. – kanchana Jun 26 at 5:48
  • Line 669 in sites/all/modules/webform_civicrm/includes/contact_component.inc – Demerit Jun 26 at 13:36
  • Thanks for your advice.. It is working now. – kanchana Jul 16 at 5:20
  • Great!......... – Demerit Jul 16 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.