Closed mcgoode closed 3 years ago
If you want calculated values like I did use Form Events.
Inside CreateOrderStepOneForm.php
->addEventListener(
FormEvents::SUBMIT,
[$this, 'onSubmit'])
/**
* @param FormEvent $event
*/
public function onSubmit(FormEvent $event)
{
/** @var Order $data */
$data = $event->getData();
$data->setCustomer($this->security->getUser());
}
I call this which is a calculated property on order but it is not kept between step. I
This becomes null on the next step.