mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
Fixed Error when trying to add/edit email recipient in CMS
This commit is contained in:
parent
b2d77150f3
commit
c0a59a7bf3
@ -598,10 +598,12 @@ class UserDefinedForm_EmailRecipient extends DataObject {
|
||||
if($multiOptionFields || $validEmailFields) {
|
||||
if($multiOptionFields && $validEmailFields) {
|
||||
$multiOptionFields->merge($validEmailFields);
|
||||
|
||||
}
|
||||
else {
|
||||
$multiOptionFields = $validEmailFields;
|
||||
elseif(!$multiOptionFields) {
|
||||
$multiOptionFields = $validEmailFields;
|
||||
}
|
||||
|
||||
$multiOptionFields = $multiOptionFields->toDropdownMap('ID', 'Title');
|
||||
$fields->insertAfter(new DropdownField('SendEmailToFieldID', _t('UserDefinedForm.ORSELECTAFIELDTOUSEASTO', '.. or Select a Field to use as the To Address'), $multiOptionFields, '', null, ""), 'EmailAddress');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user