From 2f5c62666a1996368c54b9071edb5c1ac4f7d0f8 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Wed, 12 May 2021 08:09:58 +0800 Subject: [PATCH] =?UTF-8?q?form=E7=BB=84=E4=BB=B6=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=9F=9F=E6=96=B0=E5=A2=9E=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/library/form/Form.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extend/catcher/library/form/Form.php b/extend/catcher/library/form/Form.php index dbe63d6..ed0e12e 100644 --- a/extend/catcher/library/form/Form.php +++ b/extend/catcher/library/form/Form.php @@ -65,6 +65,8 @@ abstract class Form protected $primaryKeyField = 'id'; + protected $primaryKeyValue = 0; + protected $fieldsValue = []; /** @@ -125,7 +127,7 @@ abstract class Form { if ($this->primaryKeyField) { return array_merge($this->fields(), [ - self::hidden($this->primaryKeyField, 0) + self::hidden($this->primaryKeyField, $this->primaryKeyValue) ]); }