1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

Fix campi personalizzati con valori multipli

This commit is contained in:
Beppe
2023-12-06 11:20:28 +01:00
parent d7316f73ee
commit 34c3b6242b
3 changed files with 15 additions and 3 deletions

View File

@@ -496,6 +496,8 @@ if ($structure->permission == 'rw') {
foreach ($customs as $custom) {
if (post($custom['name']) !== null) {
$values[$custom['id']] = post($custom['name']);
}else{
$values[$custom['id']] = '';
}
}
@@ -520,6 +522,7 @@ if ($structure->permission == 'rw') {
$customs_present = array_column($customs_present, 'id_field');
foreach ($values as $key => $value) {
$value = (!is_array($value) ? $value : json_encode($value));
if (in_array($key, $customs_present)) {
$dbo->update('zz_field_record', [
'value' => $value,