Since there isare no additional comments or answers for more than 24hrs, I will assume my approach was a valid one soand I will just post it here as an answer.
After further digging I found out that FormBehaviorTrait
dispatches event onPrepareForm
whichwhich is perfect for loading the field prefix.
The downside, or rathererather the inconvinieceinconvenience, of this apporachapproach is the requirement to create a getFormVactorygetFormFactory
method. NotThis is not a big deal, but also not really something I'm willing to spend my 5s of time on.
What I did was to just copycopied the dispatch part from preprocessForm
method of the trait into my componentscomponent's model and addingadded the prepareForm
event method in the plugin.
It works this This way worked for me.