1

I am writing an extension to enhance search builder. I am using myext_civicrm_postProcess hook and I've my 2 extra fields in builder form. I wanted to add only 2 more fields into existing search builder. I found this file /Library/WebServer/Documents/drupal/sites/all/modules/civicrm/CRM/Contact/Form/Search/Builder.php into CRM core and I found in this function it is manipulating form data and creating an array containing conditions values. All I need to pass my conditions into that array. In this file it is having this array $this->_params which holds query's conditions. For example I merge my array into this function manually and it worked as expected but I want to pass this array from my hook function. Apart from that everywhere I could see to write own query, but I thought to not proceed with this. Any single guidance will help me a lot.

  • I think the 'webform-civicrm' tag is not relevent as your Q does not specify Drupal Webform. Pls remove if I am correct on this. – petednz - fuzion Jul 15 '17 at 23:32
  • Ok @petednz-fuzion I did what you said. But is there anything you can help me with ? Is there any other option you can suggest please let me know. – Vineet Jul 16 '17 at 9:10
  • It's not clear what you're asking in the question. What does "worked as expected" mean? When you say "pass this array" where are you passing it to and why? Are you also using the civicrm_buildForm hook? That's normally how you add extra fields: docs.civicrm.org/dev/en/stable/hooks/hook_civicrm_buildForm – Demerit Jul 18 '17 at 14:48

Your Answer

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

Browse other questions tagged or ask your own question.