Body: <p>I am writing an extension to enhance search builder. I am using <code>myext_civicrm_postProcess</code> 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 
  <code>/Library/WebServer/Documents/drupal/sites/all/modules/civicrm/CRM/Contact/Form/Search/Builder.php</code>
  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 <code>$this-&gt;_params</code> 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 <code>hook</code> 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. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-15T23:32:50.393Z
Comments.Text: 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.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-16T09:10:30.667Z
Comments.Text: 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.
Comments.UserDisplayName: Vineet
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-18T14:48:08.373Z
Comments.Text: 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: https://docs.civicrm.org/dev/en/stable/hooks/hook_civicrm_buildForm
Comments.UserDisplayName: Demerit
Tags: <extension><civicase><civicrm-entity>
Title: add new conditions in postProcess hook - Civicrm
ThreadText: # add new conditions in postProcess hook - Civicrm
  
  (Asked by: username_0 on 2017-07-15)
  
  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.
  
  **Tags:** extension, civicase, civicrm-entity
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: 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.  
  > **username_2**: 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: https://docs.civicrm.org/dev/en/stable/hooks/hook_civicrm_buildForm  
  
  ---
  
  ## 0 answers
  
  