mirror of
https://github.com/getgrav/grav.git
synced 2026-07-05 07:39:26 +02:00
FlexForm: Fix unique id for new objects
This commit is contained in:
@@ -45,9 +45,10 @@ class FlexForm implements FlexFormInterface
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->form = $form;
|
||||
$uniqueId = $object->exists() ? $object->getStorageKey() : "{$object->getType()}:new";
|
||||
$this->setObject($object);
|
||||
$this->setId($this->getName());
|
||||
$this->setUniqueId(md5($this->getObject()->getStorageKey()));
|
||||
$this->setUniqueId(md5($uniqueId));
|
||||
$this->errors = [];
|
||||
$this->submitted = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user