Hello, good people.
I simply cannot get my head around form dependencies and how to do it.
The problem at hand:
Getting data from controller to filter select box options inside a fieldset inside fieldset inside form…
I have tried manual creation of form and elements (new Form/Element() etc), and entered the needed data in element spec, but these are not available at __construct or init in elements.
I then tried instantiating forms and elements by using injection, and specifying the needed data in factories. By using the options parameter of form element manager option parameter I succeeded in getting the data by way of the element constructor, but then my multi level form broke down, and I was unable to sort it out.
To make the short story: What is the best practice for passing data from controller to fieldset elements? I mean, what is the intended way of doing this properly? Before I invest another couple of days in a dead end, I’d like to get a qualified direction to go in…
Is there any elaborate example or documentation of how to do this?