Merge pull request #10274 from tiller1010/check-for-dot-syntax-component

Check for component before saving, fallback to full form field name
This commit is contained in:
Guy Sartorelli 2022-05-09 15:15:50 +12:00 committed by GitHub
commit 35d5f16286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -475,8 +475,10 @@ class FormField extends RequestHandler
$component = $record->relObject($relation);
}
if ($fieldName) {
if ($fieldName && $component) {
$component->setCastedField($fieldName, $this->dataValue());
} else {
$record->setCastedField($this->name, $this->dataValue());
}
}