mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 11:05:32 +02:00
Merge branch '1.2' into 1.3
This commit is contained in:
commit
fd088d32bc
@ -257,10 +257,20 @@ class StringTagField extends DropdownField
|
||||
|
||||
$name = $this->getName();
|
||||
|
||||
$record->$name = join(',', $this->Value());
|
||||
$record->$name = $this->dataValue();
|
||||
$record->write();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that arrays are imploded before being saved
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function dataValue()
|
||||
{
|
||||
return implode(',', $this->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a JSON string of tags, for lazy loading.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user