Issue Feature Closed

#103917Make it possible to add elements to the result array in FormEngine for all fields

Sybille Peters 05/26/24, 06:33 updated 09/14/24, 11:05

Description

There are several methods to customize nodes in FormEngine / add own nodes:

  • renderType
  • “user” type
  • FieldInformation, FieldControl, FieldWizard

However if someone wants to make some changes to all nodes, it is difficult, since it is not possible to XCLASS abstract classes and the classes the nodes inherit from are all abstract (e.g. AbstractNode)

Possible implementation

Add an event which is dispatched in AbstractNode::initializeResultArray(), making it possible to modify the result array.

Possible applications

1. add additional JavaScript modules, stylesheets or language files
2. I have been looking into alternative of a JavaScript displayCond solution (dynamicDisplayCond) and in order to apply this one would have to add additional JavaScript. This can be done, for example with a custom FieldInformation, but this would then have to be added to every TCA / Flexform where one wishes to use this. Also, if a JavaScript file is added in a general way, this does not make it possible to pass table name, uid of the record and additional data

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.