max = $max; return $this; } protected function addScript() { $this->script .= <<dialog->id()}'), container: replaceNestedFormIndex('#{$this->getAttribute('id')}'), input: replaceNestedFormIndex('#hidden-{$this->id}'), multiple: true, max: {$this->max}, values: {$this->options}, }); JS; } /** * 转化为数组格式保存. * * @param mixed $value * * @return array|mixed */ public function prepareInputValue($value) { return Helper::array($value, true); } }