If I try to set the current selected value of a dropdown field, nothing happens
I tried it different ways:
$members = Member::get()->map()->toArray();
DropdownField('Test', 'Test', $members, Member::currentUserID());
DropdownField('Test', 'Test', $members)->setValue(Member::currentUserID());
DropdownField('Test', 'Test', $members)->setValue(1);
None of these lines above seem to work.
If I call in DropdownField::construct()
Debug::dump($this->value);
The correct value is returned. But if I insert the same line of code in DropdownField::Field() I get an empty value back.
Am I missing something or is this just not the way it should work?