Answer the question
In order to leave comments, you need to log in
How to display a module in a form?
Version Zend Framework 2.4 php5.4
Perhaps the question is simple, but for me it is complicated, the essence of the question is this:
we have in one module, let's call it conditionally ModuleOne
, and it has a form for outputting data, you need to add html from another to this form module, conditional ModuleTwo
.
I'll tell you more about the modules themselves, ModuleOne
this is a large module in which there is the creation of a form for the output of data (applications), as well as their editing, removal, addition. ModuleTwo
this is a pop-up that is displayed on the application review page ModuleOne
under certain conditions. It’s not a problem to make a popup) I made it and displayed it in this module, but there was another task that, in addition to the popapik, should be displayed in a certain fieldset of the application view form additional html code that relates toModuleTwo
, the place where the form is assembled, file sets are created and where the fields are added found, I can stuff the html code there, but how do I cram the module code there?) brains do not catch up a little
Answer the question
In order to leave comments, you need to log in
look towards the View helpers, https://framework.zend.com/manual/2.4/en/modules/z...
create it in the second module, register it in the application as written in the help, and just call it in your form.
The helper works simply, when accessed from the script view, the framework automatically loads it and calls methods inside that should return information suitable for embedding in the output script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question