diff --git a/lib/zin/wg/form/v1.php b/lib/zin/wg/form/v1.php index d4b1b54e1a..ae72003a9e 100644 --- a/lib/zin/wg/form/v1.php +++ b/lib/zin/wg/form/v1.php @@ -96,7 +96,10 @@ class form extends formBase $this->setProp('pinnedItems', explode(',', $config->$module->custom->$key)); } } + } + protected function beforeBuild() + { $fields = $this->prop('fields'); if(is_string($fields)) $fields = explode(',', $fields); if(is_array($fields)) $fields = useFields($fields); @@ -117,7 +120,7 @@ class form extends formBase $this->setProp('autoLoad', $autoLoad); } } - } + } protected function getItemLabel(string $name): ?string { @@ -317,4 +320,10 @@ class form extends formBase return $items; } + + protected function build() + { + $this->beforeBuild(); + return parent::build(); + } }