1

I tried to implement the following hook (in my extension "cividoncamillo"), to set a default Contribution Type, but it does not work... Any Ideas why not?

//does not work
function cividoncamillo_civicrm_buildForm($formName, &$form) {
 if (($formName == 'CRM_Contribute_Form_Contribution_Main')){
   $defaults['financial_type_id'] = '1';
   $form->setDefaults($defaults);
 }
}

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.