opalepatrick Posted August 16, 2019 Share Posted August 16, 2019 Is it possible to access a modules output from within another module. I am trying to access Formbuilder output in a function for a sales admin module that I am building. Any how-to's or pointers appreciated. Link to comment Share on other sites More sharing options...
dragan Posted August 16, 2019 Share Posted August 16, 2019 (edited) Maybe write a hook for FB, and inside that hook you pass the output to your sales module? Just remember to use wire('modules') instead of $modules... When you say "function", do you mean your own custom PW module, or just a function in your template(s) ? Edited August 16, 2019 by dragan added link to FB hook docs Link to comment Share on other sites More sharing options...
Edison Posted August 16, 2019 Share Posted August 16, 2019 Hi @opalepatrick, your can load your module anywhere and then call one of its methods: $myModule = $modules->get('MyGreatModule'); $myModule->greatRender(); //call whatever method of the module It's probably helpful to have a look at $modules API to get more details. Also this forum post could be useful: Link to comment Share on other sites More sharing options...
opalepatrick Posted August 16, 2019 Author Share Posted August 16, 2019 Thank you both, I have now got something to work with. @dragan it is my own custom PW module that I wanted to access output from Formbuilder. I just couldn't work out a method. I will go and do some more work. Link to comment Share on other sites More sharing options...
teppo Posted August 17, 2019 Share Posted August 17, 2019 Hey @opalepatrick – just a heads-up that I'm moving this thread to the Module/Plugin Development area. The main "Modules" area is only intended for support threads of existing modules. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now