mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
API Restrict "to" destination selection to only fields with pre-defined values
This commit is contained in:
parent
ee62d8956f
commit
879dd38328
@ -132,9 +132,8 @@ class UserDefinedForm_EmailRecipient extends DataObject {
|
|||||||
);
|
);
|
||||||
$validSubjectFields->merge($multiOptionFields);
|
$validSubjectFields->merge($multiOptionFields);
|
||||||
|
|
||||||
// To address can only be email fields or multi option fields
|
// To address cannot be unbound, so restrict to pre-defined lists
|
||||||
$validEmailToFields = new ArrayList($validEmailFromFields->toArray());
|
$validEmailToFields = $multiOptionFields;
|
||||||
$validEmailToFields->merge($multiOptionFields);
|
|
||||||
|
|
||||||
// Build fieldlist
|
// Build fieldlist
|
||||||
$fields = FieldList::create(Tabset::create('Root')->addExtraClass('EmailRecipientForm'));
|
$fields = FieldList::create(Tabset::create('Root')->addExtraClass('EmailRecipientForm'));
|
||||||
|
Loading…
Reference in New Issue
Block a user