/** * Return the CheckboxSetField value as a string * selected item keys. * * @return string */ public function dataValue() { if ($this->value && is_array($this->value) && $this->multiple) { $filtered = array(); foreach ($this->value as $item) { if ($item) { $filtered[] = str_replace(",", "{comma}", $item); } } return implode(',', $filtered); } else { return parent::dataValue(); } }
/** * @return String */ function dataValue() { if ($this->value && $this->multiple && is_array($this->value)) { return implode(',', $this->value); } else { return parent::dataValue(); } }