has_goal()) : ?> form($formId)->sumIntendedAmount(), [ 'sanitize' => false, 'decimal' => false, ] ) ); // Setup default count value $count = (new ProgressBarModal(['ids' => [$formId]]))->getDonationCount();; // Setup default count label $countLabel = _n('donation', 'donations', $count, 'give'); // Setup default goal value $goal = give_currency_filter( give_format_amount( $form->get_goal(), [ 'sanitize' => false, 'decimal' => false, ] ) ); // Change values and labels based on goal format switch ($goalStats['format']) { case 'percentage': { $raised = "{$goalStats['progress']}%"; break; } case 'donation': { $count = $goalStats['actual']; $goal = $goalStats['goal']; break; } case 'donors': { $count = $goalStats['actual']; $countLabel = _n('donor', 'donors', $count, 'give'); $goal = $goalStats['goal']; break; } } ?>