Reputation: 1173
I need to customize and add 2 custom fields in civicrm activity search(advance search).
I am using civicrm 4.7 with drupal 7.
I have added the 2 fields : a dropdown with search conditions like (=,!=, <, >, etc) and a textbox with searched string.
Now I want to be able to alter the sql that is executed when the search form is submitted using activity search form with action :
example.com/civicrm/activity/search
I have gone through developers resources and available hooks but I couldn't find a way to alter the code and add the 2 conditions to the existing query that is prepared based on rest of existing search form fields.
I even checked custom searches but as I don't want to create a new custom search and I just want to modify the existing search so that it can be modified in core and later included as patch in civicrm so others can benefit.
So far I have found no way to achieve it. But recently I have checked the Search.php inside "CRM/Activity/form/" folder and this is where I might have to do the changes.
As I am new to civicrm so I have no clear idea how the civicrm MVC works. So far I am able to understand the directory structure but I have no clear idea regarding DAO/BAO and selector.php in respective folders of Activity folder.
Any help would be appreciated so that I can contribute to the community of civicrm.
Refer to this image for the search form fields :
Upvotes: 0
Views: 195