瀏覽代碼

修复HasMany以及array表单渲染部分字段无法填充默认值问题

jqh 4 年之前
父節點
當前提交
af28b17475
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Form/NestedForm.php

+ 1 - 1
src/Form/NestedForm.php

@@ -371,7 +371,7 @@ class NestedForm extends WidgetForm
 
     protected function formatClass($name = null)
     {
-        return str_replace('.', '_', $name ?: $this->relationName);
+        return str_replace('.', '_', $name ?: $this->relationName).'_'.$this->key;
     }
 
     protected function formatName($name = null)