mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
commit
35d5f16286
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user