CRM-19294: Unable to continue on required file field
authordeb.monish <monish.deb@webaccessglobal.com>
Thu, 8 Dec 2016 11:49:55 +0000 (17:19 +0530)
committerdeb.monish <monish.deb@webaccessglobal.com>
Thu, 8 Dec 2016 11:49:55 +0000 (17:19 +0530)
CRM/Contribute/Form/ContributionBase.php

index 7bbff8c6c1a24222f2b52a4ca42d6ad391e626e8..7bdec1a478ded2912f0ff27b373edd41d116abef 100644 (file)
@@ -658,6 +658,10 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
             else {
               $viewOnlyFileValues[$key] = $fileValue;
             }
+
+            // On viewOnly use-case (as in online contribution Confirm page) we no longer need to set
+            // required property because being required file is already uploaded while registration
+            $field['is_required'] = FALSE;
           }
           if ($profileContactType) {
             //Since we are showing honoree name separately so we are removing it from honoree profile just for display