diff --git a/src/FormElement/ScheduleElement.php b/src/FormElement/ScheduleElement.php index d79a1c25..2b13e5e9 100644 --- a/src/FormElement/ScheduleElement.php +++ b/src/FormElement/ScheduleElement.php @@ -125,7 +125,7 @@ public function hasCronExpression(): bool */ public function getFrequency(): string { - return $this->getValue('frequency', $this->frequency); + return $this->getPopulatedValue('frequency', $this->frequency); } /** @@ -396,8 +396,9 @@ protected function assemble() } $this->setStart($start); + $autosubmit = ! $this->hasCronExpression() && $this->getFrequency() !== static::NO_REPEAT; $this->addElement('localDateTime', 'start', [ - 'class' => ! $this->hasCronExpression() ? 'autosubmit' : null, + 'class' => $autosubmit ? 'autosubmit' : null, 'required' => true, 'label' => $this->translate('Start'), 'value' => $start, @@ -590,7 +591,6 @@ public function prepareMultipartUpdate(RequestInterface $request): array $partUpdates = []; if ( $autoSubmittedBy - && ! $this->hasCronExpression() && ( preg_match('/\[(start|end)]$/', $autoSubmittedBy[0], $matches) || preg_match($pattern, $autoSubmittedBy[0])