Merge pull request #134 from torleif/patch-1

FIX: use correct ID if it exists. Fixes #133
This commit is contained in:
Daniel Hensby 2016-07-18 00:44:14 +01:00 committed by GitHub
commit cbebc589b2

View File

@ -217,7 +217,7 @@ class Widget extends DataObject
$fields = $this->getCMSFields();
$outputFields = new FieldList();
$this->FormID = $this->FormID ?: uniqid();
$this->FormID = $this->ID ?: uniqid();
$outputFields->push(HiddenField::create('Widget[' . $this->FormID . '][FormID]', 'FormID',
$this->FormID)->addExtraClass('formid'));