If two (or more) forms rendered on one page have a field with the same name, display-logic criteria is added to both - even if one doesn’t have any logic applied.
// Form A
$fields = FieldList::create(
$text = TextField::create('Title', 'Title')
);
$text->displayIf('Title')->isEqualTo('Bar')
// Form B
$fields = FieldList::create(
TextField::create('Title', 'Some unrelated title')
);
If two (or more) forms rendered on one page have a field with the same name, display-logic criteria is added to both - even if one doesn’t have any logic applied.
The title fields for both forms will get
data-display-logic-eval
etc added. This is because extensions in SilverStripe are singletons by default, so the$this->displayLogicCriteria
array will be stored for all forms: https://github.com/unclecheese/silverstripe-display-logic/blob/c5f807dc24765438b427814350cc884ca70498b0/src/Extensions/DisplayLogic.php#L94-L95Fix is to add the following YAML config: