I have a quiz module where a member answers questions and gets a result. I used a form and action id to process the form answer to generate the result, but don’t know how to get that result variable to show up on the page where the user took the quiz. I used echo, but then it doesn’t show up on the quiz page, just a blank page. I tried changing the action url on the form from siteurl to url of the page, but still nothing. I don’t really understand action ids and can’t find much of any info on them anywhere. Any resources or help with specific issue is appreciated.
The action id is mostly seperate from how you’ll display quiz results. It’s just a way to tell EE what method and class to use when it gets that particular id.
You’ll most likely store the quiz results in the database with the relevant method.
About the only display aspects would be redirecting after everything is processed and maybe giving them a system success message. And maybe validation- just depends.
But for showing the results, you want a tag pair, sort of like channel entry tags or comment tags or what have you. The action id won’t really be in play at that point.
That help at all?
Take a look at the comment module and its action ids to get a feel for how it works. That module is fairly simple and not too far off from the basic actions you need to take.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.