Show custom fields only on search pages
This commit is contained in:
parent
20c8985954
commit
bdfc89f904
@ -167,7 +167,7 @@ function softcreditcustomfields_civicrm_preProcess($formName, &$form) {
|
||||
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_buildForm
|
||||
*/
|
||||
function softcreditcustomfields_civicrm_buildForm($formName, &$form) {
|
||||
if ('CRM_Contribute_Form_Search' == $formName
|
||||
if (('CRM_Contribute_Form_Search' == $formName && $form->getVar('_context') == 'search')
|
||||
|| ('CRM_Contact_Form_Search_Advanced' == $formName && ('CiviContribute' == $form->_searchPane || $form->_flagSubmitted))
|
||||
) {
|
||||
CRM_Contribute_BAO_Query::addCustomFormFields($form, ['ContributionSoft']);
|
||||
|
Loading…
Reference in New Issue
Block a user