However, whenever I reference a value from a previous step in the Component like this:
protected function createStep2(): Form
{
$values = $this->getValues();
$form = $this->createForm();
if($values->seasonDesc === 'personal') {
//conditional form based on values from the first step
}
}
I get Notice: Undefined property: Nette\Utils\ArrayHash::{$nameOfProperty} even though I know the property should exist since it was created in the previous step.
This is the whole point of a wizard for me, that I can change the next step's form base on the values from the previous step. So is there any canonical way to do this other than always calling $values->offsetExists('seasonDesc')?
Hello, have used the template for
latte
used in the quickstart.However, whenever I reference a value from a previous step in the Component like this:
I get
Notice: Undefined property: Nette\Utils\ArrayHash::{$nameOfProperty}
even though I know the property should exist since it was created in the previous step.This is the whole point of a wizard for me, that I can change the next step's form base on the values from the previous step. So is there any canonical way to do this other than always calling
$values->offsetExists('seasonDesc')
?