1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-16 03:34:33 +02:00
This commit is contained in:
Ryan Cramer
2022-06-24 09:31:44 -04:00
parent 356cde2d5c
commit 4f63edf25e

View File

@@ -1377,7 +1377,10 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
$f->set("value$language->id", $v);
}
} else if($f instanceof InputfieldCheckbox) {
if($value) $f->attr('checked', 'checked');
if($value) $f->attr('checked', 'checked');
} else if($f instanceof InputfieldText && is_array($value) && isset($value['data'])) {
// a previously multi-language value that's now a single-language value
$f->val($value['data']);
} else {
$f->val($value);
}