So I’m preparing to write a module, and I was looking through the EE control flow. If you submit a form, it appears that it is an action request. Which, of course, it what it should be, right?
So what is displayed after the action request is processed? Judging from the code, if it’s an action request…. the templating engine doesn’t run? Yet I’ve seen an action request show a template.
I’m sure I’m missing something crucial here, but what is the proper thing to do to take input from a form and continue on in your module?
Yes, modules should use an action request when submitting forms. Like every rule there are exceptions, but this is what we suggest.
When a form is submitted, for example the Comment form, typically there is a hidden value that points to where one should return via a redirect. And in certain cases, like a preview, we will use the contents of a template to output a page for an action request. I would suggest you look at mod.comment.php as it is a pretty straight forward usage of actions.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.