Skip to content

Commit

Permalink
SendForm: Fix getting value from radio element
Browse files Browse the repository at this point in the history
  • Loading branch information
Timm Ortloff committed Feb 2, 2023
1 parent 1a4e85d commit d743983
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/Reporting/Web/Forms/SendForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function assemble()

(new SendMail())->initConfigForm($this, $this->report);

$radio = $this->addElement('radio', 'source_radio', [
$this->addElement('radio', 'source_radio', [
'label' => $this->translate('E-Mail Source'),
'options' => [
'manual' => $this->translate('Manual input'),
Expand All @@ -45,7 +45,7 @@ protected function assemble()
'class' => 'autosubmit'
]);

if ($radio->getValue('source_radio') === 'contacts') {
if ($this->getPopulatedValue('source_radio', 'contacts') === 'contacts') {
$emails = [null => $this->translate('Select Contacts')];
foreach (EmailProviderHook::getProviders() as $provider) {
$emails = array_merge($emails, $provider->getContactEmails());
Expand Down

0 comments on commit d743983

Please sign in to comment.