mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 22:40:48 +00:00
修改checkbox问题
This commit is contained in:
parent
1a6116c954
commit
7963309822
@ -74,10 +74,14 @@ class Service extends Make
|
||||
break;
|
||||
default:
|
||||
$valueContent = "''";
|
||||
$input = '$info["' . $item['field'] . '"] ?? ';
|
||||
if (in_array($item['type'], ['checkbox'])) {
|
||||
$valueContent = '[]';
|
||||
$input = '(array)(' . $input . $valueContent . ')';
|
||||
} else {
|
||||
$input = $input . $valueContent;
|
||||
}
|
||||
$from[] = $this->tab(2) . '$rule[] = FormBuilder::' . $item['type'] . '("' . $item['field'] . '", "' . $item['name'] . '", $info["' . $item['field'] . '"] ?? ' . $valueContent . ')' . $this->getOptionContent(in_array($item['type'], ['radio', 'select']), $item['option'] ?? []) . ';';
|
||||
$from[] = $this->tab(2) . '$rule[] = FormBuilder::' . $item['type'] . '("' . $item['field'] . '", "' . $item['name'] . '", ' . $input . ')' . $this->getOptionContent(in_array($item['type'], ['radio', 'select', 'checkbox']), $item['option'] ?? []) . ';';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user