mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
Merge pull request #134 from torleif/patch-1
FIX: use correct ID if it exists. Fixes #133
This commit is contained in:
commit
cbebc589b2
@ -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'));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user