From 75c8cb7c04f6802c6c266ddac3f589c12d154567 Mon Sep 17 00:00:00 2001 From: Guillaume RISCHARD Date: Sun, 24 Feb 2019 13:47:15 +0100 Subject: [PATCH] Correctly target CRM_Contribute_Form_Contribution_Main --- username.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/username.php b/username.php index 7529422..2d23a93 100644 --- a/username.php +++ b/username.php @@ -143,7 +143,7 @@ function username_civicrm_entityTypes(&$entityTypes) { function username_civicrm_validateForm($formName, &$fields, &$files, &$form, &$errors) { if ( $formName == 'CRM_Contact_Form_Contact' or $formName == 'CRM_Contact_Form_Inline_CustomData' or - $formName == 'CRM_Contact_Form_Inline_CustomData' + $formName == 'CRM_Contribute_Form_Contribution_Main' ) { $osmfield = civicrm_api3('CustomField', 'getsingle', array('label' => 'OSM username')); if(! $osmfield){