mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Check for component before saving, fallback to full form field name
This commit is contained in:
parent
cb05e52b0f
commit
13b81c5e38
@ -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…
x
Reference in New Issue
Block a user